@@ -62,7 +62,7 @@ |
||
62 | 62 | return \iterator_to_array($value); |
63 | 63 | |
64 | 64 | case \is_object($value) && \method_exists($value, '__toString'): |
65 | - return (string)$value; |
|
65 | + return (string) $value; |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | return $value; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | ($this->then)($query); |
70 | 70 | |
71 | 71 | foreach ($query->getCriteria() as $criterion) { |
72 | - if (! $criterion instanceof Where) { |
|
72 | + if (!$criterion instanceof Where) { |
|
73 | 73 | $error = 'Groups allow to specify only Where selections, but %s given'; |
74 | 74 | throw new \LogicException(\sprintf($error, $criterion)); |
75 | 75 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | $error = 'Relation should be string ("relation_name") '. |
43 | - 'or array (["relation" => function]), ' . |
|
43 | + 'or array (["relation" => function]), '. |
|
44 | 44 | 'but %s given'; |
45 | 45 | |
46 | 46 | throw new \InvalidArgumentException(\sprintf($error, \gettype($relation))); |
@@ -110,7 +110,7 @@ |
||
110 | 110 | */ |
111 | 111 | protected function mode(): bool |
112 | 112 | { |
113 | - return \tap($this->conjunction, function () { |
|
113 | + return \tap($this->conjunction, function() { |
|
114 | 114 | $this->conjunction = true; |
115 | 115 | }); |
116 | 116 | } |
@@ -10,7 +10,6 @@ |
||
10 | 10 | namespace RDS\Hydrogen\Query; |
11 | 11 | |
12 | 12 | use RDS\Hydrogen\Criteria\Group; |
13 | -use RDS\Hydrogen\Criteria\Having; |
|
14 | 13 | use RDS\Hydrogen\Criteria\Where; |
15 | 14 | use RDS\Hydrogen\Query; |
16 | 15 | use RDS\Hydrogen\Query\WhereProvider\WhereBetweenProvider; |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | { |
51 | 51 | $name = $pattern |
52 | 52 | ? \snake_case(\class_basename($pattern)) |
53 | - : 'q' . Str::random(7); |
|
53 | + : 'q'.Str::random(7); |
|
54 | 54 | |
55 | 55 | return \sprintf('%s_%d', $name, ++static::$lastQueryId); |
56 | 56 | } |
@@ -61,6 +61,6 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function placeholder(string $pattern = null): string |
63 | 63 | { |
64 | - return ':' . $this->createAlias($pattern); |
|
64 | + return ':'.$this->createAlias($pattern); |
|
65 | 65 | } |
66 | 66 | } |
@@ -25,7 +25,7 @@ |
||
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 | } |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function query(): Query |
44 | 44 | { |
45 | - if (! $this instanceof EntityRepository) { |
|
45 | + if (!$this instanceof EntityRepository) { |
|
46 | 46 | $error = 'Could not use %s under non-repository class, but %s given'; |
47 | 47 | throw new \LogicException(\sprintf($error, Hydrogen::class, static::class)); |
48 | 48 | } |
@@ -120,7 +120,7 @@ |
||
120 | 120 | */ |
121 | 121 | public function __get(string $key): HigherOrderCollectionProxy |
122 | 122 | { |
123 | - if (! \in_array($key, static::$proxies, true)) { |
|
123 | + if (!\in_array($key, static::$proxies, true)) { |
|
124 | 124 | $error = "Property [{$key}] does not exist on this collection instance."; |
125 | 125 | throw new \InvalidArgumentException($error); |
126 | 126 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $expression = $this->getDoctrineExpression($having, $builder->expr(), $having->getField()); |
29 | 29 | |
30 | - yield from $this->extractResult($expression, function ($expr) use ($having, $builder) { |
|
30 | + yield from $this->extractResult($expression, function($expr) use ($having, $builder) { |
|
31 | 31 | if ($having->isAnd()) { |
32 | 32 | $builder->andHaving($expr); |
33 | 33 | } else { |