Test Failed
Push — master ( 1c5165...b7ef6a )
by Kirill
03:37
created
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      *  }, ...);
24 24
      * </code>
25 25
      */
26
-    if (! \defined('_')) {
26
+    if (!\defined('_')) {
27 27
         \define('_', \RDS\Hydrogen\Collection\HigherOrderCollectionProxy::PATTERN);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Criteria/OrderBy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,6 +64,6 @@
 block discarded – undo
64 64
      */
65 65
     public function isDesc(): bool
66 66
     {
67
-        return ! $this->asc;
67
+        return !$this->asc;
68 68
     }
69 69
 }
Please login to merge, or discard this patch.
src/Processor/DatabaseProcessor.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
      * Returns a set of pending operations (Deferred) and QueryBuilder.
150 150
      *
151 151
      * @param Query $query
152
-     * @return \Generator|\Closure[]|QueryBuilder
152
+     * @return \Generator
153 153
      */
154 154
     protected function toBuilder(Query $query): \Generator
155 155
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function getScalarResult(Query $query)
58 58
     {
59
-        return $this->exec($query, function (DoctrineQuery $query) {
59
+        return $this->exec($query, function(DoctrineQuery $query) {
60 60
             return $query->getSingleScalarResult();
61 61
         });
62 62
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     private function applicator(QueryBuilder $builder): \Closure
159 159
     {
160
-        return function ($response) use ($builder) {
160
+        return function($response) use ($builder) {
161 161
             // Send the context (the builder) in case the
162 162
             // answer contains an empty value.
163 163
             if ($response === null) {
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
      */
184 184
     public function getResult(Query $query): iterable
185 185
     {
186
-        $result = $this->exec($query, function (DoctrineQuery $query) {
186
+        $result = $this->exec($query, function(DoctrineQuery $query) {
187 187
             return $query->getResult();
188 188
         });
189 189
 
190
-        $fn = function (array $result) {
190
+        $fn = function(array $result) {
191 191
             foreach ($result as $item) {
192 192
                 yield \is_array($item) ? \reset($item) : $item;
193 193
             }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function getArrayResult(Query $query): array
204 204
     {
205
-        return $this->exec($query, function (DoctrineQuery $query) {
205
+        return $this->exec($query, function(DoctrineQuery $query) {
206 206
             return $query->getArrayResult();
207 207
         });
208 208
     }
Please login to merge, or discard this patch.
src/Processor/DatabaseProcessor/GroupBuilder.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 use Doctrine\ORM\QueryBuilder;
13 13
 use RDS\Hydrogen\Criteria\CriterionInterface;
14 14
 use RDS\Hydrogen\Criteria\Group;
15
-use RDS\Hydrogen\Criteria\Where;
16 15
 
17 16
 /**
18 17
  * Class GroupBuilder
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         foreach ($inner->getCriteria() as $where) {
33 33
             $expression = parent::getDoctrineExpression($where, $builder->expr(), $where->getField());
34 34
 
35
-            yield from $this->extractResult($expression, function ($current) use ($expr, $where, $builder) {
35
+            yield from $this->extractResult($expression, function($current) use ($expr, $where, $builder) {
36 36
                 if ($where->isAnd()) {
37 37
                     $expr->add($current);
38 38
                 } else {
Please login to merge, or discard this patch.
src/Processor/Processor.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     }
82 82
 
83 83
     /**
84
-     * @param mixed $context
84
+     * @param \Doctrine\ORM\QueryBuilder $context
85 85
      * @param Query $query
86 86
      * @return \Generator
87 87
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      * @param Query $query
86 86
      * @return \Generator
87 87
      */
88
-    protected function forEach($context, Query $query): \Generator
88
+    protected function forEach ($context, Query $query): \Generator
89 89
     {
90 90
         foreach ($query->getCriteria() as $criterion) {
91 91
             $builder = $this->getBuilder($criterion);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
      * @param Query $query
86 86
      * @return \Generator
87 87
      */
88
-    protected function forEach($context, Query $query): \Generator
88
+    protected function foreach($context, Query $query): \Generator
89 89
     {
90 90
         foreach ($query->getCriteria() as $criterion) {
91 91
             $builder = $this->getBuilder($criterion);
Please login to merge, or discard this patch.
src/Query.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
     /**
80 80
      * Returns a list of selection criteria.
81 81
      *
82
-     * @return \Generator|CriterionInterface[]
82
+     * @return \Generator
83 83
      */
84 84
     public function getCriteria(): \Generator
85 85
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -10,9 +10,7 @@
 block discarded – undo
10 10
 namespace RDS\Hydrogen;
11 11
 
12 12
 use Doctrine\Common\Persistence\ObjectRepository;
13
-use Doctrine\ORM\EntityManagerInterface;
14 13
 use Illuminate\Support\Traits\Macroable;
15
-use phpDocumentor\Reflection\Types\Self_;
16 14
 use RDS\Hydrogen\Criteria\CriterionInterface;
17 15
 use RDS\Hydrogen\Fn\RawFunction;
18 16
 use RDS\Hydrogen\Query\AliasProvider;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 
82 82
             $config = $this->getRepository()->getEntityManager()->getConfiguration();
83 83
 
84
-            if (! $config->getCustomStringFunction('RAW')) {
84
+            if (!$config->getCustomStringFunction('RAW')) {
85 85
                 $config->addCustomStringFunction('RAW', RawFunction::class);
86 86
             }
87 87
         }
Please login to merge, or discard this patch.
src/Query/OrderProvider.php 1 patch
Doc Comments   +2 added lines patch added patch discarded remove patch
@@ -34,6 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     /**
36 36
      * @param string ...$fields
37
+     * @param string[] $fields
37 38
      * @return Query|$this|self
38 39
      */
39 40
     public function asc(string ...$fields): self
@@ -70,6 +71,7 @@  discard block
 block discarded – undo
70 71
 
71 72
     /**
72 73
      * @param string ...$fields
74
+     * @param string[] $fields
73 75
      * @return Query|$this|self
74 76
      */
75 77
     public function desc(string ...$fields): self
Please login to merge, or discard this patch.
src/Query/RepositoryProvider.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     protected $repository;
26 26
 
27 27
     /**
28
-     * @param ObjectRepository|Hydrogen $repository
28
+     * @param ObjectRepository $repository
29 29
      * @return Query|$this
30 30
      */
31 31
     public function from(ObjectRepository $repository): self
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     }
35 35
 
36 36
     /**
37
-     * @return ObjectRepository|Hydrogen
37
+     * @return ObjectRepository
38 38
      * @throws \LogicException
39 39
      */
40 40
     public function getRepository(): ObjectRepository
Please login to merge, or discard this patch.
src/Query/WhereProvider/WhereLikeProvider.php 1 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\WhereProvider;
11 11
 
12 12
 use RDS\Hydrogen\Criteria\Where\Operator;
13
-use RDS\Hydrogen\Criteria\Where;
14 13
 use RDS\Hydrogen\Query;
15 14
 
16 15
 /**
Please login to merge, or discard this patch.