Completed
Pull Request — master (#33)
by Raí
14:34 queued 01:52
created
Bludata/Doctrine/ORM/Repositories/QueryWorker.php 1 patch
Upper-Lower-Casing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $query = $this->queryBuilder->getQuery();
102 102
 
103 103
         if (method_exists($query, 'setHint')) {
104
-            $query->setHint(Query::HINT_INCLUDE_META_COLUMNS, true);
104
+            $query->setHint(Query::HINT_INCLUDE_META_COLUMNS, TRUE);
105 105
         }
106 106
 
107 107
         return $query;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @return array
140 140
      */
141
-    public function toArray(array $options = null)
141
+    public function toArray(array $options = NULL)
142 142
     {
143 143
         $array = [];
144 144
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
      *
197 197
      * @return QueryWorker
198 198
      */
199
-    public function withFilters(array $filters = null)
199
+    public function withFilters(array $filters = NULL)
200 200
     {
201 201
         if ($filters) {
202 202
             foreach ($filters as $filter) {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      *
270 270
      * @return $this
271 271
      */
272
-    public function andWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
272
+    public function andWhere($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
273 273
     {
274 274
         if (strpos($field, '.') > 0) {
275 275
             //monta os joins
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
      *
296 296
      * @return $this
297 297
      */
298
-    public function orWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
298
+    public function orWhere($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
299 299
     {
300 300
         if (strpos($field, '.') > 0) {
301 301
             //monta os joins
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
      *
372 372
      * @return $this
373 373
      */
374
-    public function andHaving($field, $operation, $value = null)
374
+    public function andHaving($field, $operation, $value = NULL)
375 375
     {
376 376
         throw new \Exception('Not implemented');
377 377
     }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      *
382 382
      * @param string $field
383 383
      */
384
-    public function orHaving($field, $operation, $value = null)
384
+    public function orHaving($field, $operation, $value = NULL)
385 385
     {
386 386
         throw new \Exception('Not implemented');
387 387
     }
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
      * @param string $parentAlias
630 630
      * @param bool   $withWhere
631 631
      */
632
-    private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = false)
632
+    private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = FALSE)
633 633
     {
634 634
         if (!in_array($alias, $this->tables)) {
635 635
             $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     private function setManyToManyValuedCondition($association, $alias, $arr)
654 654
     {
655 655
         if (empty($this->fieldValue['value']) || $this->position < count($arr) - 2) {
656
-            return null;
656
+            return NULL;
657 657
         }
658 658
         $targetField = $this->position == count($arr) - 1 ? $association['joinTable']['joinColumns'][0]['referencedColumnName'] : end($arr);
659 659
 
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
      * @param string $alias
668 668
      * @param mix    $condition
669 669
      */
670
-    private function setManyToManyJoin($table, $alias, $condition = null)
670
+    private function setManyToManyJoin($table, $alias, $condition = NULL)
671 671
     {
672 672
         if (!in_array($alias, $this->tables)) {
673 673
             if ($condition) {
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
             foreach ($parentMeta->parentClasses as $classe) {
742 742
                 $associationsByTargetClass = $meta->getAssociationsByTargetClass($classe);
743 743
                 if (count($associationsByTargetClass) > 0) {
744
-                    $parentTable = lcfirst(substr($classe, strrpos($classe, strpos($classe, '\\') !== false ? '\\' : '/') + 1));
744
+                    $parentTable = lcfirst(substr($classe, strrpos($classe, strpos($classe, '\\') !== FALSE ? '\\' : '/') + 1));
745 745
                     $field = $this->searchAssociationField($associationsByTargetClass, $parentTable, $value);
746 746
                     if ($field) {
747 747
                         return $field;
@@ -785,7 +785,7 @@  discard block
 block discarded – undo
785 785
     {
786 786
         $validExpressions = ['SUM', 'MIN', 'MAX', 'AVG', 'COUNT'];
787 787
         if (in_array(trim(strtoupper($expression)), $validExpressions)) {
788
-            if (strpos($field, '.') === false) {
788
+            if (strpos($field, '.') === FALSE) {
789 789
                 $field = getFullFieldName($field, $fieldAlias);
790 790
             }
791 791
             $this->queryFields[] = sprintf('%s(%s) AS %s', $expression, $field, $alias);
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
      * @param null   $value
810 810
      * @param string $alias
811 811
      */
812
-    protected function makeExpression($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
812
+    protected function makeExpression($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
813 813
     {
814 814
         $originalValue = $value;
815 815
 
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
         if ($field) {
820 820
             $field = $this->getFullFieldName($field, $alias);
821 821
         }
822
-        $expression = null;
822
+        $expression = NULL;
823 823
         switch (strtolower($operation)) {
824 824
             case '>':
825 825
                 $expression = $this->queryBuilder->expr()->gt($field, $value);
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Repositories/BaseRepository.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
     }
45 45
 
46
-    public function findRemoved($id, bool $abort = true): EntityContract
46
+    public function findRemoved($id, bool $abort = TRUE): EntityContract
47 47
     {
48 48
     }
49 49
 
Please login to merge, or discard this patch.
Bludata/Framework/Laravel/Helpers/functions.php 1 patch
Upper-Lower-Casing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @param string $version   = 'v1'
28 28
      * @param bool   $abort     = true
29 29
      */
30
-    function bdClassExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
30
+    function bdClassExists(string $folder, string $className, string $version = 'v1', bool $abort = TRUE)
31 31
     {
32 32
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
33 33
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             abort(500, 'Undefined \''.$className.'\'');
40 40
         }
41 41
 
42
-        return null;
42
+        return NULL;
43 43
     }
44 44
 }
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @param string $version   = 'v1'
55 55
      * @param bool   $abort     = true
56 56
      */
57
-    function bdInterfaceExists(string $folder, string $className, string $version = 'v1', bool $abort = true)
57
+    function bdInterfaceExists(string $folder, string $className, string $version = 'v1', bool $abort = TRUE)
58 58
     {
59 59
         $entityClass = config('bludata.generator.rootNamespace').'\\'.$folder.'\\'.$version.'\\'.$className;
60 60
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             abort(500, 'Undefined \''.$className.'\'');
67 67
         }
68 68
 
69
-        return null;
69
+        return NULL;
70 70
     }
71 71
 }
72 72
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @param string $version   = 'v1'
77 77
      * @param bool   $abort     = true
78 78
      */
79
-    function bdInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
79
+    function bdInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
80 80
     {
81 81
         dd(config('bludata.generator.paths.interfaces'));
82 82
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @param string $version   = 'v1'
91 91
      * @param bool   $abort     = true
92 92
      */
93
-    function bdContractClass(string $className, string $version = 'v1', bool $abort = true)
93
+    function bdContractClass(string $className, string $version = 'v1', bool $abort = TRUE)
94 94
     {
95 95
         return bdInterfaceExists(config('bludata.generator.paths.contracts'), $className.'Interface', $version, $abort);
96 96
     }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      * @param string $version   = 'v1'
103 103
      * @param bool   $abort     = true
104 104
      */
105
-    function bdContract(string $className, string $version = 'v1', bool $abort = true)
105
+    function bdContract(string $className, string $version = 'v1', bool $abort = TRUE)
106 106
     {
107 107
         return app(bdContractClass($className, $version, $abort));
108 108
     }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      * @param string $version   = 'v1'
115 115
      * @param bool   $abort     = true
116 116
      */
117
-    function bdRepositoryInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
117
+    function bdRepositoryInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
118 118
     {
119 119
         return bdInterfaceClass($className.'Repository', $version, $abort);
120 120
     }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param string $version   = 'v1'
127 127
      * @param bool   $abort     = true
128 128
      */
129
-    function bdRepositoryClass(string $className, string $version = 'v1', bool $abort = true)
129
+    function bdRepositoryClass(string $className, string $version = 'v1', bool $abort = TRUE)
130 130
     {
131 131
         return bdClassExists(config('bludata.generator.paths.repositories'), $className.'Repository', $version, $abort);
132 132
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      * @param string $version   = 'v1'
139 139
      * @param bool   $abort     = true
140 140
      */
141
-    function bdRepository(string $className, string $version = 'v1', bool $abort = true)
141
+    function bdRepository(string $className, string $version = 'v1', bool $abort = TRUE)
142 142
     {
143 143
         return app(bdRepositoryInterfaceClass($className, $version, $abort));
144 144
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      * @param string $version   = 'v1'
151 151
      * @param bool   $abort     = true
152 152
      */
153
-    function bdServiceInterfaceClass(string $className, string $version = 'v1', bool $abort = true)
153
+    function bdServiceInterfaceClass(string $className, string $version = 'v1', bool $abort = TRUE)
154 154
     {
155 155
         return bdInterfaceClass($className.'Service', $version, $abort);
156 156
     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      * @param string $version   = 'v1'
163 163
      * @param bool   $abort     = true
164 164
      */
165
-    function bdServiceClass(string $className, string $version = 'v1', bool $abort = true)
165
+    function bdServiceClass(string $className, string $version = 'v1', bool $abort = TRUE)
166 166
     {
167 167
         return bdClassExists(config('bludata.generator.paths.services'), $className.'Service', $version, $abort);
168 168
     }
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      * @param string $version   = 'v1'
175 175
      * @param bool   $abort     = true
176 176
      */
177
-    function bdService(string $className, string $version = 'v1', bool $abort = true)
177
+    function bdService(string $className, string $version = 'v1', bool $abort = TRUE)
178 178
     {
179 179
         return app(bdServiceInterfaceClass($className, $version, $abort));
180 180
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      * @param string $version   = 'v1'
187 187
      * @param bool   $abort     = true
188 188
      */
189
-    function bdEntityClass(string $className, string $version = 'v1', bool $abort = true)
189
+    function bdEntityClass(string $className, string $version = 'v1', bool $abort = TRUE)
190 190
     {
191 191
         return bdClassExists(config('bludata.generator.paths.entities'), $className, $version, $abort);
192 192
     }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      * @param string $version   = 'v1'
199 199
      * @param bool   $abort     = true
200 200
      */
201
-    function bdEntity(string $className, string $version = 'v1', bool $abort = true)
201
+    function bdEntity(string $className, string $version = 'v1', bool $abort = TRUE)
202 202
     {
203 203
         return app(bdEntityClass($className, $version, $abort));
204 204
     }
Please login to merge, or discard this patch.