Completed
Push — master ( e69c57...b56ccd )
by Kirill
02:39
created
src/Processor/DatabaseProcessor/WhereBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     {
31 31
         $expression = $this->getDoctrineExpression($where, $builder->expr(), $where->getField());
32 32
 
33
-        yield from $this->extractResult($expression, function ($expr) use ($where, $builder) {
33
+        yield from $this->extractResult($expression, function($expr) use ($where, $builder) {
34 34
             if ($where->isAnd()) {
35 35
                 $builder->andWhere($expr);
36 36
             } else {
Please login to merge, or discard this patch.
src/Criteria/Where.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Criteria/Common/Field.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     {
102 102
         $field = null;
103 103
 
104
-        $replacement = function (array $matches) use (&$field) {
104
+        $replacement = function(array $matches) use (&$field) {
105 105
             $field = $matches[1] ?: ($matches[2] ?? null);
106 106
 
107 107
             return \str_replace_first($field, '%s', $matches[0]);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             throw new \LogicException($error);
115 115
         }
116 116
 
117
-        return \array_merge([$wrapper], $this->analyzePrefix((string)$field));
117
+        return \array_merge([$wrapper], $this->analyzePrefix((string) $field));
118 118
     }
119 119
 
120 120
     /**
Please login to merge, or discard this patch.
src/Criteria/Group.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Query/RelationProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
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)));
Please login to merge, or discard this patch.
src/Query/WhereProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/Query/AliasProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
src/Query/SelectProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Hydrogen.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.