@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @return array |
| 44 | 44 | */ |
| 45 | - public function transform($userGroups): ?array |
|
| 45 | + public function transform($userGroups): ? array |
|
| 46 | 46 | { |
| 47 | 47 | $output = []; |
| 48 | 48 | |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | * |
| 53 | 53 | * @return string |
| 54 | 54 | */ |
| 55 | - $iterator = function ($userGroup) { |
|
| 55 | + $iterator = function($userGroup) { |
|
| 56 | 56 | return \is_string($userGroup) ? $userGroup : $userGroup->getId(); |
| 57 | 57 | }; |
| 58 | 58 | |
@@ -71,12 +71,12 @@ discard block |
||
| 71 | 71 | * |
| 72 | 72 | * @throws TransformationFailedException if object (issue) is not found. |
| 73 | 73 | */ |
| 74 | - public function reverseTransform($userGroups): ?array |
|
| 74 | + public function reverseTransform($userGroups): ? array |
|
| 75 | 75 | { |
| 76 | 76 | $output = null; |
| 77 | 77 | |
| 78 | 78 | if (\is_array($userGroups)) { |
| 79 | - $iterator = function (string $groupId) { |
|
| 79 | + $iterator = function(string $groupId) { |
|
| 80 | 80 | $group = $this->resource->findOne($groupId); |
| 81 | 81 | |
| 82 | 82 | if ($group === null) { |
@@ -152,7 +152,7 @@ |
||
| 152 | 152 | * |
| 153 | 153 | * @return void |
| 154 | 154 | */ |
| 155 | - $iterator = function (UserGroup $userGroup) use (&$choices) { |
|
| 155 | + $iterator = function(UserGroup $userGroup) use (&$choices) { |
|
| 156 | 156 | $name = $userGroup->getName() . ' [' . $userGroup->getRole()->getId() . ']'; |
| 157 | 157 | |
| 158 | 158 | $choices[$name] = $userGroup->getId(); |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | * |
| 110 | 110 | * @return void |
| 111 | 111 | */ |
| 112 | - $iterator = function (UserGroup $userGroup) use (&$choices) { |
|
| 112 | + $iterator = function(UserGroup $userGroup) use (&$choices) { |
|
| 113 | 113 | $name = $userGroup->getName() . ' [' . $userGroup->getRole()->getId() . ']'; |
| 114 | 114 | |
| 115 | 115 | $choices[$name] = $userGroup->getId(); |
@@ -112,7 +112,7 @@ |
||
| 112 | 112 | // Initialize output |
| 113 | 113 | $choices = []; |
| 114 | 114 | |
| 115 | - $iterator = function (RoleEntity $role) use (&$choices) { |
|
| 115 | + $iterator = function(RoleEntity $role) use (&$choices) { |
|
| 116 | 116 | $name = $this->rolesService->getRoleLabel($role->getId()); |
| 117 | 117 | |
| 118 | 118 | $choices[$name] = $role->getId(); |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | $encoder = $this->getEncoder($user); |
| 119 | 119 | |
| 120 | 120 | // Password hash callback |
| 121 | - $callback = function ($plainPassword) use ($encoder, $user) { |
|
| 121 | + $callback = function($plainPassword) use ($encoder, $user) { |
|
| 122 | 122 | return $encoder->encodePassword($plainPassword, $user->getSalt()); |
| 123 | 123 | }; |
| 124 | 124 | |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | if ($populateAll && \count($populate) === 0) { |
| 110 | 110 | $associations = $this->getResource()->getAssociations(); |
| 111 | 111 | |
| 112 | - $iterator = function (string $assocName) use ($entityName): string { |
|
| 112 | + $iterator = function(string $assocName) use ($entityName): string { |
|
| 113 | 113 | return $entityName . '.' . $assocName; |
| 114 | 114 | }; |
| 115 | 115 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * @param array $search |
| 33 | 33 | * @param integer $count |
| 34 | 34 | */ |
| 35 | - public function afterCount(array &$criteria, array &$search, int &$count): void |
|
| 35 | + public function afterCount(array &$criteria, array &$search, int&$count): void |
|
| 36 | 36 | { |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @param RestDtoInterface $dto |
| 26 | 26 | * @param EntityInterface $entity |
| 27 | 27 | */ |
| 28 | - public function beforeUpdate(string &$id, RestDtoInterface $dto, EntityInterface $entity): void |
|
| 28 | + public function beforeUpdate(string&$id, RestDtoInterface $dto, EntityInterface $entity): void |
|
| 29 | 29 | { |
| 30 | 30 | } |
| 31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | * @param RestDtoInterface $dto |
| 37 | 37 | * @param EntityInterface $entity |
| 38 | 38 | */ |
| 39 | - public function afterUpdate(string &$id, RestDtoInterface $dto, EntityInterface $entity): void |
|
| 39 | + public function afterUpdate(string&$id, RestDtoInterface $dto, EntityInterface $entity): void |
|
| 40 | 40 | { |
| 41 | 41 | } |
| 42 | 42 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @param integer $offset |
| 27 | 27 | * @param array $search |
| 28 | 28 | */ |
| 29 | - public function beforeFind(array &$criteria, array &$orderBy, int &$limit, int &$offset, array &$search): void |
|
| 29 | + public function beforeFind(array &$criteria, array &$orderBy, int&$limit, int&$offset, array &$search): void |
|
| 30 | 30 | { |
| 31 | 31 | } |
| 32 | 32 | |
@@ -43,8 +43,8 @@ discard block |
||
| 43 | 43 | public function afterFind( |
| 44 | 44 | array &$criteria, |
| 45 | 45 | array &$orderBy, |
| 46 | - int &$limit, |
|
| 47 | - int &$offset, |
|
| 46 | + int&$limit, |
|
| 47 | + int&$offset, |
|
| 48 | 48 | array &$search, |
| 49 | 49 | array &$entities |
| 50 | 50 | ): void { |