chore: Fix wrong classes naming

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2024-03-09 13:19:02 +01:00
parent ff9bf9f91d
commit d17b50183a
60 changed files with 200 additions and 200 deletions

View File

@@ -25,7 +25,7 @@
namespace SP\Infrastructure\User\Repositories;
use SP\DataModel\ItemSearchData;
use SP\DataModel\UserProfileItemWithIdAndName;
use SP\DataModel\UserProfile;
use SP\Domain\Core\Exceptions\ConstraintException;
use SP\Domain\Core\Exceptions\QueryException;
use SP\Domain\User\Ports\UserProfileRepository;
@@ -111,7 +111,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
public function getById(int $id): QueryResult
{
$queryData = new QueryData();
$queryData->setMapClassName(UserProfileItemWithIdAndName::class);
$queryData->setMapClassName(UserProfile::class);
$queryData->setQuery('SELECT id, `name`, `profile` FROM UserProfile WHERE id = ? LIMIT 1');
$queryData->addParam($id);
@@ -128,7 +128,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
public function getAll(): QueryResult
{
$queryData = new QueryData();
$queryData->setMapClassName(UserProfileItemWithIdAndName::class);
$queryData->setMapClassName(UserProfile::class);
$queryData->setQuery('SELECT id, `name` FROM UserProfile ORDER BY `name`');
return $this->db->doSelect($queryData);
@@ -153,7 +153,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
'SELECT id, `name` FROM UserProfile WHERE id IN ('.$this->buildParamsFromArray($ids).')';
$queryData = new QueryData();
$queryData->setMapClassName(UserProfileItemWithIdAndName::class);
$queryData->setMapClassName(UserProfile::class);
$queryData->setQuery($query);
$queryData->setParams($ids);
@@ -217,7 +217,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
/**
* Creates an item
*
* @param UserProfileItemWithIdAndName $itemData
* @param UserProfile $itemData
*
* @return int
* @throws ConstraintException
@@ -244,7 +244,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
/**
* Checks whether the item is duplicated on adding
*
* @param UserProfileItemWithIdAndName $itemData
* @param UserProfile $itemData
*
* @return bool
* @throws ConstraintException
@@ -262,7 +262,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
/**
* Updates an item
*
* @param UserProfileItemWithIdAndName $itemData
* @param UserProfile $itemData
*
* @return int
* @throws ConstraintException
@@ -293,7 +293,7 @@ final class UserProfileBaseRepository extends BaseRepository implements UserProf
/**
* Checks whether the item is duplicated on updating
*
* @param UserProfileItemWithIdAndName $itemData
* @param UserProfile $itemData
*
* @return bool
* @throws ConstraintException