@@ -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 { |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | * @param string $id |
| 24 | 24 | * @param EntityInterface $entity |
| 25 | 25 | */ |
| 26 | - public function beforeDelete(string &$id, EntityInterface $entity): void |
|
| 26 | + public function beforeDelete(string&$id, EntityInterface $entity): void |
|
| 27 | 27 | { |
| 28 | 28 | } |
| 29 | 29 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param string $id |
| 34 | 34 | * @param EntityInterface $entity |
| 35 | 35 | */ |
| 36 | - public function afterDelete(string &$id, EntityInterface $entity): void |
|
| 36 | + public function afterDelete(string&$id, EntityInterface $entity): void |
|
| 37 | 37 | { |
| 38 | 38 | } |
| 39 | 39 | } |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | * |
| 23 | 23 | * @param string $id |
| 24 | 24 | */ |
| 25 | - public function beforeFindOne(string &$id): void |
|
| 25 | + public function beforeFindOne(string&$id): void |
|
| 26 | 26 | { |
| 27 | 27 | } |
| 28 | 28 | |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | * @param string $id |
| 33 | 33 | * @param null|EntityInterface $entity |
| 34 | 34 | */ |
| 35 | - public function afterFindOne(string &$id, EntityInterface $entity = null): void |
|
| 35 | + public function afterFindOne(string&$id, EntityInterface $entity = null): void |
|
| 36 | 36 | { |
| 37 | 37 | } |
| 38 | 38 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * |
| 90 | 90 | * @return array |
| 91 | 91 | */ |
| 92 | - $createCriteria = function (string $column, $value, $operator = null) { |
|
| 92 | + $createCriteria = function(string $column, $value, $operator = null) { |
|
| 93 | 93 | if (\strpos($column, '.') === false) { |
| 94 | 94 | $column = 'entity.' . $column; |
| 95 | 95 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @param mixed $value |
| 109 | 109 | * @param string $column |
| 110 | 110 | */ |
| 111 | - $processCriteria = function ($value, $column) use (&$condition, $createCriteria) { |
|
| 111 | + $processCriteria = function($value, $column) use (&$condition, $createCriteria) { |
|
| 112 | 112 | // If criteria contains 'and' OR 'or' key(s) assume that array in only in the right format |
| 113 | 113 | if (\strcmp($column, 'and') === 0 || \strcmp($column, 'or') === 0) { |
| 114 | 114 | $condition[$column] = $value; |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | $parameters[] = '?' . self::$parameterCount; |
| 289 | 289 | $queryBuilder->setParameter(self::$parameterCount, $comparison->value[1]); |
| 290 | 290 | } else { // Otherwise this must be IN or NOT IN expression |
| 291 | - $parameters[] = \array_map(function ($value) use ($queryBuilder) { |
|
| 291 | + $parameters[] = \array_map(function($value) use ($queryBuilder) { |
|
| 292 | 292 | return $queryBuilder->expr()->literal($value); |
| 293 | 293 | }, $comparison->value); |
| 294 | 294 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * |
| 27 | 27 | * @return array|null |
| 28 | 28 | */ |
| 29 | - public static function getCriteria($column, $search, string $operand = null, int $mode = null): ?array |
|
| 29 | + public static function getCriteria($column, $search, string $operand = null, int $mode = null): ? array |
|
| 30 | 30 | { |
| 31 | 31 | $operand = $operand ?? self::OPERAND_OR; |
| 32 | 32 | $mode = $mode ?? self::MODE_FULL; |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * |
| 39 | 39 | * @return bool |
| 40 | 40 | */ |
| 41 | - $iterator = function ($value) { |
|
| 41 | + $iterator = function($value) { |
|
| 42 | 42 | return mb_strlen(\trim((string)$value)) > 0; |
| 43 | 43 | }; |
| 44 | 44 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * |
| 74 | 74 | * @return array|null |
| 75 | 75 | */ |
| 76 | - private static function createCriteria(array $columns, array $searchTerms, string $operand, int $mode): ?array |
|
| 76 | + private static function createCriteria(array $columns, array $searchTerms, string $operand, int $mode): ? array |
|
| 77 | 77 | { |
| 78 | 78 | /** |
| 79 | 79 | * Lambda function to process each search term to specified search columns. |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | * |
| 83 | 83 | * @return array |
| 84 | 84 | */ |
| 85 | - $iteratorTerm = function ($term) use ($columns, $mode) { |
|
| 86 | - $iteratorColumn = function ($column) use ($term, $mode) { |
|
| 85 | + $iteratorTerm = function($term) use ($columns, $mode) { |
|
| 86 | + $iteratorColumn = function($column) use ($term, $mode) { |
|
| 87 | 87 | if (\strpos($column, '.') === false) { |
| 88 | 88 | $column = 'entity.' . $column; |
| 89 | 89 | } |