@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | public function select(...$fields): self |
| 26 | 26 | { |
| 27 | 27 | foreach ($fields as $field) { |
| 28 | - if (! \is_array($field) && ! \is_string($field)) { |
|
| 28 | + if (!\is_array($field) && !\is_string($field)) { |
|
| 29 | 29 | $error = 'Selection should be array (["field" => "alias"]) or string ("field") but %s given'; |
| 30 | 30 | throw new \InvalidArgumentException(\sprintf($error, \gettype($field))); |
| 31 | 31 | } |
@@ -52,6 +52,6 @@ discard block |
||
| 52 | 52 | */ |
| 53 | 53 | public function withEntity(string $alias = null): Query |
| 54 | 54 | { |
| 55 | - return $this->select([':' . $this->getAlias() => $alias]); |
|
| 55 | + return $this->select([':'.$this->getAlias() => $alias]); |
|
| 56 | 56 | } |
| 57 | 57 | } |
@@ -199,7 +199,7 @@ |
||
| 199 | 199 | */ |
| 200 | 200 | public function add(CriterionInterface $criterion): self |
| 201 | 201 | { |
| 202 | - if (! $criterion->isAttached()) { |
|
| 202 | + if (!$criterion->isAttached()) { |
|
| 203 | 203 | $criterion->attach($this); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | if ($result === null) { |
| 115 | 115 | $stmt = \is_object($value) ? \get_class($value) : \gettype($value); |
| 116 | - $error = 'Unrecognized coroutine\'s return statement: ' . $stmt; |
|
| 116 | + $error = 'Unrecognized coroutine\'s return statement: '.$stmt; |
|
| 117 | 117 | $context->throw(new \InvalidArgumentException($error)); |
| 118 | 118 | } |
| 119 | 119 | |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $query->from($this->repository); |
| 136 | 136 | |
| 137 | - if (! $query->has(Criteria\Selection::class)) { |
|
| 138 | - $query->select(':' . $query->getAlias()); |
|
| 137 | + if (!$query->has(Criteria\Selection::class)) { |
|
| 138 | + $query->select(':'.$query->getAlias()); |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | /** |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | private function getKey(array $relation): string |
| 105 | 105 | { |
| 106 | - return $relation['sourceEntity'] . '_' . $relation['targetEntity']; |
|
| 106 | + return $relation['sourceEntity'].'_'.$relation['targetEntity']; |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $key = $this->getKey($relation); |
| 116 | 116 | |
| 117 | - if (! isset($this->relations[$key])) { |
|
| 117 | + if (!isset($this->relations[$key])) { |
|
| 118 | 118 | return $this->relations[$key] = |
| 119 | 119 | $this->query->createAlias( |
| 120 | 120 | $relation['sourceEntity'], |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | $selection = yield $select->getField(); |
| 30 | 30 | |
| 31 | 31 | if ($select->hasAlias()) { |
| 32 | - $selection .= ' AS ' . $select->getAlias(); |
|
| 32 | + $selection .= ' AS '.$select->getAlias(); |
|
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | $builder->addSelect($selection); |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function apply($builder, CriterionInterface $relation): ?iterable |
| 27 | 27 | { |
| 28 | - throw new \LogicException(__CLASS__ . ' not implemented yet'); |
|
| 28 | + throw new \LogicException(__CLASS__.' not implemented yet'); |
|
| 29 | 29 | } |
| 30 | 30 | } |
@@ -58,6 +58,6 @@ |
||
| 58 | 58 | { |
| 59 | 59 | $alias = $sqlWalker->getSQLTableAlias($this->table->value, $this->alias->value); |
| 60 | 60 | |
| 61 | - return $alias . '.' . $this->field->value; |
|
| 61 | + return $alias.'.'.$this->field->value; |
|
| 62 | 62 | } |
| 63 | 63 | } |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | private function registerDQLFunctions(Configuration $config): void |
| 45 | 45 | { |
| 46 | 46 | foreach (self::DQL_FUNCTIONS as $name => $fn) { |
| 47 | - if (! $config->getCustomStringFunction($name)) { |
|
| 47 | + if (!$config->getCustomStringFunction($name)) { |
|
| 48 | 48 | $config->addCustomStringFunction($name, $fn); |
| 49 | 49 | } |
| 50 | 50 | } |