Test Setup Failed
Push — master ( cec486...d03ce1 )
by Raí
09:22 queued 01:32
created
Bludata/Doctrine/Common/Contracts/QueryWorkerContract.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
 
7 7
 interface QueryWorkerContract
8 8
 {
9
-    public function __construct(RepositoryContract $repository);
9
+    public function __construct (RepositoryContract $repository);
10 10
 
11
-    public function getResult(): ArrayCollection;
11
+    public function getResult (): ArrayCollection;
12 12
 
13
-    public function getOneResult(): ?EntityContract;
13
+    public function getOneResult (): ?EntityContract;
14 14
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Doctrine\Common\Collections\ArrayCollection;
6 6
 
7
-interface QueryWorkerContract
8
-{
7
+interface QueryWorkerContract {
9 8
     public function __construct(RepositoryContract $repository);
10 9
 
11 10
     public function getResult(): ArrayCollection;
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Contracts/EntityContract.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -6,35 +6,35 @@
 block discarded – undo
6 6
 
7 7
 interface EntityContract
8 8
 {
9
-    public function getId();
9
+    public function getId ();
10 10
 
11
-    public function getCreatedAt(): ?DateTime;
11
+    public function getCreatedAt (): ?DateTime;
12 12
 
13
-    public function getUpdatedAt(): ?DateTime;
13
+    public function getUpdatedAt (): ?DateTime;
14 14
 
15
-    public function getDeletedAt(): ?DateTime;
15
+    public function getDeletedAt (): ?DateTime;
16 16
 
17
-    public function getRepository(): RepositoryContract;
17
+    public function getRepository (): RepositoryContract;
18 18
 
19
-    public function preRemove();
19
+    public function preRemove ();
20 20
 
21
-    public function postRemove();
21
+    public function postRemove ();
22 22
 
23
-    public function prePersist();
23
+    public function prePersist ();
24 24
 
25
-    public function postPersist();
25
+    public function postPersist ();
26 26
 
27
-    public function preUpdate();
27
+    public function preUpdate ();
28 28
 
29
-    public function postUpdate();
29
+    public function postUpdate ();
30 30
 
31
-    public function preFlush();
31
+    public function preFlush ();
32 32
 
33
-    public function persist(): EntityContract;
33
+    public function persist (): EntityContract;
34 34
 
35
-    public function flush(): EntityContract;
35
+    public function flush (): EntityContract;
36 36
 
37
-    public function remove(): EntityContract;
37
+    public function remove (): EntityContract;
38 38
 
39
-    public function undelete(): EntityContract;
39
+    public function undelete (): EntityContract;
40 40
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use DateTime;
6 6
 
7
-interface EntityContract
8
-{
7
+interface EntityContract {
9 8
     public function getId();
10 9
 
11 10
     public function getCreatedAt(): ?DateTime;
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Annotations/Fillable.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
  * @Annotation
7 7
  * @Target({"PROPERTY"})
8 8
  */
9
-class Fillable
10
-{
9
+class Fillable {
11 10
 
12 11
 }
Please login to merge, or discard this patch.
Bludata/Doctrine/Common/Providers/CommonServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class CommonServiceProvider extends ServiceProvider
8 8
 {
9
-    public function register()
9
+    public function register ()
10 10
     {
11 11
         register_annotation_dir(__DIR__.'/../Annotations');
12 12
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Support\ServiceProvider;
6 6
 
7
-class CommonServiceProvider extends ServiceProvider
8
-{
7
+class CommonServiceProvider extends ServiceProvider {
9 8
     public function register()
10 9
     {
11 10
         register_annotation_dir(__DIR__.'/../Annotations');
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Repositories/QueryWorker.php 2 patches
Upper-Lower-Casing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @return QueryWorker
66 66
      */
67
-    public function withFilters(array $filters = null)
67
+    public function withFilters(array $filters = NULL)
68 68
     {
69 69
         if ($filters) {
70 70
             foreach ($filters as $filter) {
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * @return $this
139 139
      */
140
-    public function andWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
140
+    public function andWhere($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
141 141
     {
142 142
         if (strpos($field, '.') > 0) {
143 143
             //monta os joins
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      *
164 164
      * @return $this
165 165
      */
166
-    public function orWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
166
+    public function orWhere($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
167 167
     {
168 168
         if (strpos($field, '.') > 0) {
169 169
             //monta os joins
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      *
240 240
      * @return $this
241 241
      */
242
-    public function andHaving($field, $operation, $value = null)
242
+    public function andHaving($field, $operation, $value = NULL)
243 243
     {
244 244
         throw new \Exception('Not implemented');
245 245
     }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
      *
250 250
      * @param string $field
251 251
      */
252
-    public function orHaving($field, $operation, $value = null)
252
+    public function orHaving($field, $operation, $value = NULL)
253 253
     {
254 254
         throw new \Exception('Not implemented');
255 255
     }
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
      * @param string $parentAlias
498 498
      * @param bool   $withWhere
499 499
      */
500
-    private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = false)
500
+    private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = FALSE)
501 501
     {
502 502
         if (!in_array($alias, $this->tables)) {
503 503
             $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
     private function setManyToManyValuedCondition($association, $alias, $arr)
522 522
     {
523 523
         if (empty($this->fieldValue['value']) || $this->position < count($arr) - 2) {
524
-            return null;
524
+            return NULL;
525 525
         }
526 526
         $targetField = $this->position == count($arr) - 1 ? $association['joinTable']['joinColumns'][0]['referencedColumnName'] : end($arr);
527 527
 
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
      * @param string $alias
536 536
      * @param mix    $condition
537 537
      */
538
-    private function setManyToManyJoin($table, $alias, $condition = null)
538
+    private function setManyToManyJoin($table, $alias, $condition = NULL)
539 539
     {
540 540
         if (!in_array($alias, $this->tables)) {
541 541
             if ($condition) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
             foreach ($parentMeta->parentClasses as $classe) {
610 610
                 $associationsByTargetClass = $meta->getAssociationsByTargetClass($classe);
611 611
                 if (count($associationsByTargetClass) > 0) {
612
-                    $parentTable = lcfirst(substr($classe, strrpos($classe, strpos($classe, '\\') !== false ? '\\' : '/') + 1));
612
+                    $parentTable = lcfirst(substr($classe, strrpos($classe, strpos($classe, '\\') !== FALSE ? '\\' : '/') + 1));
613 613
                     $field = $this->searchAssociationField($associationsByTargetClass, $parentTable, $value);
614 614
                     if ($field) {
615 615
                         return $field;
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
     {
654 654
         $validExpressions = ['SUM', 'MIN', 'MAX', 'AVG', 'COUNT'];
655 655
         if (in_array(trim(strtoupper($expression)), $validExpressions)) {
656
-            if (strpos($field, '.') === false) {
656
+            if (strpos($field, '.') === FALSE) {
657 657
                 $field = getFullFieldName($field, $fieldAlias);
658 658
             }
659 659
             $this->queryFields[] = sprintf('%s(%s) AS %s', $expression, $field, $alias);
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
      * @param null   $value
678 678
      * @param string $alias
679 679
      */
680
-    protected function makeExpression($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
680
+    protected function makeExpression($field, $operation, $value = NULL, $alias = self::DEFAULT_TABLE_ALIAS)
681 681
     {
682 682
         $originalValue = $value;
683 683
 
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
         if ($field) {
688 688
             $field = $this->getFullFieldName($field, $alias);
689 689
         }
690
-        $expression = null;
690
+        $expression = NULL;
691 691
         switch (strtolower($operation)) {
692 692
             case '>':
693 693
                 $expression = $this->queryBuilder->expr()->gt($field, $value);
Please login to merge, or discard this patch.
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -15,40 +15,40 @@  discard block
 block discarded – undo
15 15
 
16 16
     protected $classMetadata;
17 17
 
18
-    protected $entitys = [];
18
+    protected $entitys = [ ];
19 19
 
20
-    protected $tables = [];
20
+    protected $tables = [ ];
21 21
 
22
-    protected $queryFields = [];
22
+    protected $queryFields = [ ];
23 23
 
24
-    protected $expressions = [];
24
+    protected $expressions = [ ];
25 25
 
26
-    protected $groupFields = [];
26
+    protected $groupFields = [ ];
27 27
 
28
-    protected $field = [];
28
+    protected $field = [ ];
29 29
 
30 30
     protected $position = 0;
31 31
 
32
-    protected $fieldValue = [];
32
+    protected $fieldValue = [ ];
33 33
 
34
-    public function __construct(BdContracts\RepositoryContract $repository)
34
+    public function __construct (BdContracts\RepositoryContract $repository)
35 35
     {
36 36
         $this->em = $repository->getEntityManager();
37 37
         $this->queryBuilder = $repository->createQueryBuilder(self::DEFAULT_TABLE_ALIAS);
38 38
         $this->classMetadata = $repository->getClassMetadata();
39 39
     }
40 40
 
41
-    public function getResult(): ArrayCollection
41
+    public function getResult (): ArrayCollection
42 42
     {
43 43
         return new ArrayCollection($this->queryBuilder->getQuery()->execute());
44 44
     }
45 45
 
46
-    public function getOneResult(): ?BdContracts\EntityContract
46
+    public function getOneResult (): ?BdContracts\EntityContract
47 47
     {
48 48
         return $this->queryBuilder->getQuery()->getOneOrNullResult();
49 49
     }
50 50
 
51
-    public function toArray(array $options = []): array
51
+    public function toArray (array $options = [ ]): array
52 52
     {
53 53
         return $this->getResult()
54 54
                     ->map(function ($element) use ($options) {
@@ -63,40 +63,40 @@  discard block
 block discarded – undo
63 63
      *
64 64
      * @return QueryWorker
65 65
      */
66
-    public function withFilters(array $filters = null)
66
+    public function withFilters (array $filters = null)
67 67
     {
68 68
         if ($filters) {
69 69
             foreach ($filters as $filter) {
70
-                switch ($filter['type']) {
70
+                switch ($filter[ 'type' ]) {
71 71
                     case 'select':
72
-                        $this->select($filter['fields']);
72
+                        $this->select($filter[ 'fields' ]);
73 73
                         break;
74 74
                     case 'andWhere':
75
-                        $this->andWhere($filter['field'], $filter['operation'], $filter['value']);
75
+                        $this->andWhere($filter[ 'field' ], $filter[ 'operation' ], $filter[ 'value' ]);
76 76
                         break;
77 77
                     case 'orWhere':
78
-                        $this->orWhere($filter['field'], $filter['operation'], $filter['value']);
78
+                        $this->orWhere($filter[ 'field' ], $filter[ 'operation' ], $filter[ 'value' ]);
79 79
                         break;
80 80
                     case 'andHaving':
81
-                        $this->andHaving($filter['field'], $filter['operation'], $filter['value']);
81
+                        $this->andHaving($filter[ 'field' ], $filter[ 'operation' ], $filter[ 'value' ]);
82 82
                         break;
83 83
                     case 'orHaving':
84
-                        $this->orHaving($filter['field'], $filter['operation'], $filter['value']);
84
+                        $this->orHaving($filter[ 'field' ], $filter[ 'operation' ], $filter[ 'value' ]);
85 85
                         break;
86 86
                     case 'addGroupBy':
87
-                        $this->addGroupBy($filter['field']);
87
+                        $this->addGroupBy($filter[ 'field' ]);
88 88
                         break;
89 89
                     case 'addOrderBy':
90
-                        $this->addOrderBy($filter['field'], $filter['order']);
90
+                        $this->addOrderBy($filter[ 'field' ], $filter[ 'order' ]);
91 91
                         break;
92 92
                     case 'fkAddOrderBy':
93
-                        $this->fkAddOrderBy($filter['field'], $filter['fkField'], $filter['order']);
93
+                        $this->fkAddOrderBy($filter[ 'field' ], $filter[ 'fkField' ], $filter[ 'order' ]);
94 94
                         break;
95 95
                     case 'paginate':
96
-                        if (isset($filter['page'])) {
97
-                            $this->paginate($filter['limit'], $filter['page']);
96
+                        if (isset($filter[ 'page' ])) {
97
+                            $this->paginate($filter[ 'limit' ], $filter[ 'page' ]);
98 98
                         } else {
99
-                            $this->paginate($filter['limit']);
99
+                            $this->paginate($filter[ 'limit' ]);
100 100
                         }
101 101
                         break;
102 102
                 }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      *
115 115
      * @return $this
116 116
      */
117
-    public function paginate($limit = 25, $page = 0)
117
+    public function paginate ($limit = 25, $page = 0)
118 118
     {
119 119
         if ($limit > 0) {
120 120
             $this->queryBuilder->setMaxResults($limit);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
      *
137 137
      * @return $this
138 138
      */
139
-    public function andWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
139
+    public function andWhere ($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
140 140
     {
141 141
         if (strpos($field, '.') > 0) {
142 142
             //monta os joins
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
                 'operation' => $operation,
146 146
             ];
147 147
             $newAliasField = $this->associationQueryFields($field);
148
-            $alias = $newAliasField['alias'];
149
-            $field = $newAliasField['field'];
148
+            $alias = $newAliasField[ 'alias' ];
149
+            $field = $newAliasField[ 'field' ];
150 150
         }
151 151
         $this->queryBuilder->andWhere($this->makeExpression($field, $operation, $value, $alias));
152 152
 
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
      *
163 163
      * @return $this
164 164
      */
165
-    public function orWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
165
+    public function orWhere ($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
166 166
     {
167 167
         if (strpos($field, '.') > 0) {
168 168
             //monta os joins
169 169
             $newAliasField = $this->associationQueryFields($field);
170
-            $alias = $newAliasField['alias'];
171
-            $field = $newAliasField['field'];
170
+            $alias = $newAliasField[ 'alias' ];
171
+            $field = $newAliasField[ 'field' ];
172 172
         }
173 173
         $this->queryBuilder->orWhere($this->makeExpression($field, $operation, $value, $alias));
174 174
 
@@ -182,18 +182,18 @@  discard block
 block discarded – undo
182 182
      *
183 183
      * @return $this
184 184
      */
185
-    private function makeExpressions($conditions, $alias = self::DEFAULT_TABLE_ALIAS)
185
+    private function makeExpressions ($conditions, $alias = self::DEFAULT_TABLE_ALIAS)
186 186
     {
187
-        $expressions = [];
187
+        $expressions = [ ];
188 188
         foreach ($conditions as $attr) {
189
-            $field = $attr['field'];
189
+            $field = $attr[ 'field' ];
190 190
             if (strpos($field, '.') > 0) {
191 191
                 //monta os joins
192 192
                 $newAliasField = $this->associationQueryFields($field);
193
-                $alias = $newAliasField['alias'];
194
-                $field = $newAliasField['field'];
193
+                $alias = $newAliasField[ 'alias' ];
194
+                $field = $newAliasField[ 'field' ];
195 195
             }
196
-            $expressions[] = $this->makeExpression($field, $attr['operation'], $attr['value'], $alias);
196
+            $expressions[ ] = $this->makeExpression($field, $attr[ 'operation' ], $attr[ 'value' ], $alias);
197 197
         }
198 198
 
199 199
         return $expressions;
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      *
205 205
      * @param string $field
206 206
      */
207
-    public function addGroupBy($field)
207
+    public function addGroupBy ($field)
208 208
     {
209 209
         $alias = self::DEFAULT_TABLE_ALIAS;
210 210
         if (strpos($field, '.') > 0) {
@@ -213,15 +213,15 @@  discard block
 block discarded – undo
213 213
         }
214 214
         if (count($this->queryFields) > 0) {
215 215
             foreach ($this->queryFields as $item) {
216
-                $parts = [];
216
+                $parts = [ ];
217 217
                 if (strpos($item, ' AS ')) {
218 218
                     $item = str_replace(')', '', str_replace('(', '', $item));
219 219
                     $parts = explode('AS', $item);
220
-                    $item = trim($parts[0]);
220
+                    $item = trim($parts[ 0 ]);
221 221
                 }
222 222
                 if (!in_array($item, $this->groupFields)) {
223 223
                     $this->queryBuilder->addGroupBy($item);
224
-                    $this->groupFields[] = $item;
224
+                    $this->groupFields[ ] = $item;
225 225
                 }
226 226
             }
227 227
         }
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      *
239 239
      * @return $this
240 240
      */
241
-    public function andHaving($field, $operation, $value = null)
241
+    public function andHaving ($field, $operation, $value = null)
242 242
     {
243 243
         throw new \Exception('Not implemented');
244 244
     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      *
249 249
      * @param string $field
250 250
      */
251
-    public function orHaving($field, $operation, $value = null)
251
+    public function orHaving ($field, $operation, $value = null)
252 252
     {
253 253
         throw new \Exception('Not implemented');
254 254
     }
@@ -259,14 +259,14 @@  discard block
 block discarded – undo
259 259
      * @param string $field
260 260
      * @param string $order
261 261
      */
262
-    public function addOrderBy($field, $order = 'ASC')
262
+    public function addOrderBy ($field, $order = 'ASC')
263 263
     {
264 264
         $alias = self::DEFAULT_TABLE_ALIAS;
265 265
         if (strpos($field, '.') > 0) {
266 266
             //monta os joins
267 267
             $newAliasField = $this->associationQueryFields($field);
268
-            $alias = $newAliasField['alias'];
269
-            $field = $newAliasField['field'];
268
+            $alias = $newAliasField[ 'alias' ];
269
+            $field = $newAliasField[ 'field' ];
270 270
         }
271 271
         $this->queryBuilder->addOrderBy($this->getFullFieldName($field, $alias), $order);
272 272
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
      * @param string $field
280 280
      * @param string $order
281 281
      */
282
-    public function fkAddOrderBy($field, $fkField, $order = 'ASC')
282
+    public function fkAddOrderBy ($field, $fkField, $order = 'ASC')
283 283
     {
284 284
         $alias = $this->tableAlias();
285 285
         $this->queryBuilder->join($this->getFullFieldName($field), $alias);
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      * @param associationField.fkField
295 295
      * @param $field
296 296
      */
297
-    public function select($fields)
297
+    public function select ($fields)
298 298
     {
299 299
         foreach ($fields as $key => $value) {
300 300
             if (is_int($key)) {
@@ -303,10 +303,10 @@  discard block
 block discarded – undo
303 303
                 $alias = $this->tableAlias();
304 304
                 $this->queryBuilder->join($this->getFullFieldName($key, self::DEFAULT_TABLE_ALIAS), $alias);
305 305
                 foreach ($value as $valueField) {
306
-                    $this->queryFields[] = $this->getFullFieldName($valueField, $alias);
306
+                    $this->queryFields[ ] = $this->getFullFieldName($valueField, $alias);
307 307
                 }
308 308
             } else {
309
-                $this->queryFields[] = $value;
309
+                $this->queryFields[ ] = $value;
310 310
             }
311 311
         }
312 312
         $this->queryBuilder->select(implode(',', $this->queryFields));
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      * @param associationField.fkField
321 321
      * @param $field
322 322
      */
323
-    public function associationQueryFields($campo)
323
+    public function associationQueryFields ($campo)
324 324
     {
325 325
         $this->field = $campo;
326 326
         $pos = strpos($campo, '.');
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
             $arr = explode('.', $campo);
329 329
             $lastField = end($arr);
330 330
 
331
-            if (count($arr) == 2 && $arr[0] == self::DEFAULT_TABLE_ALIAS) {
331
+            if (count($arr) == 2 && $arr[ 0 ] == self::DEFAULT_TABLE_ALIAS) {
332 332
                 //não é um campo composto
333 333
                 return [
334 334
                     'field' => $lastField,
335
-                    'alias' => $arr[0],
335
+                    'alias' => $arr[ 0 ],
336 336
                 ];
337 337
             }
338 338
 
@@ -343,14 +343,14 @@  discard block
 block discarded – undo
343 343
                 if ($this->position < count($arr) - 1) {
344 344
                     $dados = $this->getMetaAndAliases();
345 345
 
346
-                    $alias = $dados['alias'];
347
-                    $parentAlias = $dados['parentAlias'];
346
+                    $alias = $dados[ 'alias' ];
347
+                    $parentAlias = $dados[ 'parentAlias' ];
348 348
 
349 349
                     if ($tempMeta) {
350 350
                         $meta = $tempMeta;
351 351
                         $tempMeta = '';
352 352
                     } else {
353
-                        $meta = $dados['parentMeta'];
353
+                        $meta = $dados[ 'parentMeta' ];
354 354
                     }
355 355
 
356 356
                     if ($meta->isAssociationWithSingleJoinColumn($value)) {
@@ -358,22 +358,22 @@  discard block
 block discarded – undo
358 358
                         $association = $meta->getAssociationMapping($value);
359 359
                         $this->setLeftJoin(
360 360
                             $meta->getAssociationTargetClass($value),
361
-                            $association['joinColumns'][0]['referencedColumnName'],
362
-                            $association['fieldName'],
361
+                            $association[ 'joinColumns' ][ 0 ][ 'referencedColumnName' ],
362
+                            $association[ 'fieldName' ],
363 363
                             $alias,
364 364
                             $parentAlias
365 365
                         );
366 366
                     } elseif ($meta->isCollectionValuedAssociation($value)) {
367 367
                         $association = $meta->getAssociationMapping($value);
368
-                        if (empty($association['mappedBy']) && empty($association['joinTable'])) {
368
+                        if (empty($association[ 'mappedBy' ]) && empty($association[ 'joinTable' ])) {
369 369
                             //não tem como fazer o join
370 370
                             $this->critical(sprintf('"%s" não é uma associação válida', $campo));
371 371
                             continue;
372 372
                         }
373
-                        if (!empty($association['joinTable'])) {
373
+                        if (!empty($association[ 'joinTable' ])) {
374 374
                             //manyToMany
375 375
                             $this->setManyToManyJoin(
376
-                                $this->getFullFieldName($association['fieldName'], $parentAlias),
376
+                                $this->getFullFieldName($association[ 'fieldName' ], $parentAlias),
377 377
                                 $alias,
378 378
                                 $this->setManyToManyValuedCondition($association, $alias, $arr)
379 379
                             );
@@ -381,8 +381,8 @@  discard block
 block discarded – undo
381 381
                             //oneToMany
382 382
                             $this->setLeftJoin(
383 383
                                 $meta->getAssociationTargetClass($value),
384
-                                $this->getTargetField($dados['meta'], $meta, $value),
385
-                                $meta->getIdentifierColumnNames()[0],
384
+                                $this->getTargetField($dados[ 'meta' ], $meta, $value),
385
+                                $meta->getIdentifierColumnNames()[ 0 ],
386 386
                                 $alias,
387 387
                                 $parentAlias
388 388
                             );
@@ -391,9 +391,9 @@  discard block
 block discarded – undo
391 391
                         //subClass
392 392
                         if (count($meta->subClasses) > 0) {
393 393
                             $temp = $this->getSubClassFields($meta, $value);
394
-                            if (!empty($temp['meta'])) {
395
-                                $this->setLeftJoin($temp['table'], $temp['targetField'], $temp['parentField'], $alias, $parentAlias);
396
-                                $tempMeta = $temp['meta'];
394
+                            if (!empty($temp[ 'meta' ])) {
395
+                                $this->setLeftJoin($temp[ 'table' ], $temp[ 'targetField' ], $temp[ 'parentField' ], $alias, $parentAlias);
396
+                                $tempMeta = $temp[ 'meta' ];
397 397
                             }
398 398
                         }
399 399
                     }
@@ -420,23 +420,23 @@  discard block
 block discarded – undo
420 420
      *
421 421
      * @return string
422 422
      */
423
-    private function getMetaAndAliases()
423
+    private function getMetaAndAliases ()
424 424
     {
425 425
         $arr = explode('.', $this->field);
426 426
         $meta = $this->classMetadata;
427
-        $metaAnterior = [];
427
+        $metaAnterior = [ ];
428 428
         $parent = '';
429 429
         $alias = '';
430 430
 
431 431
         for ($i = 0; $i <= $this->position; $i++) {
432 432
             $metaAnterior = $meta;
433 433
 
434
-            if ($meta->hasAssociation($arr[$i])) {
435
-                $class = $meta->getAssociationTargetClass($arr[$i]);
434
+            if ($meta->hasAssociation($arr[ $i ])) {
435
+                $class = $meta->getAssociationTargetClass($arr[ $i ]);
436 436
             } elseif (count($meta->subClasses) > 0) {
437
-                $temp = $this->getSubClassFields($meta, $arr[$i]);
438
-                if (!empty($temp['meta'])) {
439
-                    $class = $temp['table'];
437
+                $temp = $this->getSubClassFields($meta, $arr[ $i ]);
438
+                if (!empty($temp[ 'meta' ])) {
439
+                    $class = $temp[ 'table' ];
440 440
                 }
441 441
             }
442 442
 
@@ -444,12 +444,12 @@  discard block
 block discarded – undo
444 444
 
445 445
             if ($i < $this->position) {
446 446
                 $parent .= $parent != '' ? '_' : '';
447
-                $parent .= $arr[$i];
447
+                $parent .= $arr[ $i ];
448 448
             }
449 449
             if ($i == $this->position) {
450 450
                 $alias .= $parent;
451 451
                 $alias .= $parent != '' ? '_' : '';
452
-                $alias .= $arr[$i];
452
+                $alias .= $arr[ $i ];
453 453
             }
454 454
         }
455 455
 
@@ -477,12 +477,12 @@  discard block
 block discarded – undo
477 477
      * @param string $alias
478 478
      * @param string $parentAlias
479 479
      */
480
-    private function setJoin($table, $field, $parentField, $alias, $parentAlias)
480
+    private function setJoin ($table, $field, $parentField, $alias, $parentAlias)
481 481
     {
482 482
         if (!in_array($alias, $this->tables)) {
483 483
             $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
484 484
             $this->queryBuilder->join($table, $alias, 'WITH', $condition);
485
-            $this->tables[] = $alias;
485
+            $this->tables[ ] = $alias;
486 486
         }
487 487
     }
488 488
 
@@ -496,7 +496,7 @@  discard block
 block discarded – undo
496 496
      * @param string $parentAlias
497 497
      * @param bool   $withWhere
498 498
      */
499
-    private function setLeftJoin($table, $field, $parentField, $alias, $parentAlias, $withWhere = false)
499
+    private function setLeftJoin ($table, $field, $parentField, $alias, $parentAlias, $withWhere = false)
500 500
     {
501 501
         if (!in_array($alias, $this->tables)) {
502 502
             $condition = $this->getFullFieldName($field, $alias).' = '.$this->getFullFieldName($parentField, $parentAlias);
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
             if ($withWhere) {
505 505
                 $this->queryBuilder->andWhere($condition);
506 506
             }
507
-            $this->tables[] = $alias;
507
+            $this->tables[ ] = $alias;
508 508
         }
509 509
     }
510 510
 
@@ -517,14 +517,14 @@  discard block
 block discarded – undo
517 517
      *
518 518
      * @return mix|null
519 519
      */
520
-    private function setManyToManyValuedCondition($association, $alias, $arr)
520
+    private function setManyToManyValuedCondition ($association, $alias, $arr)
521 521
     {
522
-        if (empty($this->fieldValue['value']) || $this->position < count($arr) - 2) {
522
+        if (empty($this->fieldValue[ 'value' ]) || $this->position < count($arr) - 2) {
523 523
             return null;
524 524
         }
525
-        $targetField = $this->position == count($arr) - 1 ? $association['joinTable']['joinColumns'][0]['referencedColumnName'] : end($arr);
525
+        $targetField = $this->position == count($arr) - 1 ? $association[ 'joinTable' ][ 'joinColumns' ][ 0 ][ 'referencedColumnName' ] : end($arr);
526 526
 
527
-        return $this->makeExpression($targetField, $this->fieldValue['operation'], $this->fieldValue['value'], $alias);
527
+        return $this->makeExpression($targetField, $this->fieldValue[ 'operation' ], $this->fieldValue[ 'value' ], $alias);
528 528
     }
529 529
 
530 530
     /**
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
      * @param string $alias
535 535
      * @param mix    $condition
536 536
      */
537
-    private function setManyToManyJoin($table, $alias, $condition = null)
537
+    private function setManyToManyJoin ($table, $alias, $condition = null)
538 538
     {
539 539
         if (!in_array($alias, $this->tables)) {
540 540
             if ($condition) {
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
             } else {
543 543
                 $this->queryBuilder->join($table, $alias);
544 544
             }
545
-            $this->tables[] = $alias;
545
+            $this->tables[ ] = $alias;
546 546
         }
547 547
     }
548 548
 
@@ -553,19 +553,19 @@  discard block
 block discarded – undo
553 553
      * @param $value
554 554
      * @param $alias
555 555
      */
556
-    private function setQueryField($meta, $value, $alias)
556
+    private function setQueryField ($meta, $value, $alias)
557 557
     {
558 558
         $campo = $this->getFullFieldName($value, $alias);
559 559
 
560 560
         if ($meta->isSingleValuedAssociation($value)) {
561
-            $targetField = $meta->getAssociationMapping($value)['joinColumns'][0]['referencedColumnName'];
561
+            $targetField = $meta->getAssociationMapping($value)[ 'joinColumns' ][ 0 ][ 'referencedColumnName' ];
562 562
             $alias = $alias == self::DEFAULT_TABLE_ALIAS ? substr($campo, strpos($campo, '.') + 1) : $alias.'_'.$targetField;
563 563
             $campo = 'IDENTITY('.$campo.') '.$alias;
564 564
         } elseif ($this->position > 0) {
565 565
             $campo = '('.$campo.') AS '.$alias.'_'.$value;
566 566
         }
567 567
         // acrescenta o campo ao select
568
-        $this->queryFields[] = $campo;
568
+        $this->queryFields[ ] = $campo;
569 569
     }
570 570
 
571 571
     /**
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
      *
577 577
      * @return string
578 578
      */
579
-    private function getSubClassFields($meta, $value)
579
+    private function getSubClassFields ($meta, $value)
580 580
     {
581 581
         foreach ($meta->subClasses as $subClass) {
582 582
             $delimiter = strpos($subClass, '/') > 0 ? '/' : '\\';
@@ -585,8 +585,8 @@  discard block
 block discarded – undo
585 585
             if (end($temp) == $value) {
586 586
                 return [
587 587
                     'table'       => $subClass,
588
-                    'parentField' => $meta->getIdentifierColumnNames()[0],
589
-                    'targetField' => $tempMeta->getIdentifierColumnNames()[0],
588
+                    'parentField' => $meta->getIdentifierColumnNames()[ 0 ],
589
+                    'targetField' => $tempMeta->getIdentifierColumnNames()[ 0 ],
590 590
                     'meta'        => $tempMeta,
591 591
                 ];
592 592
             }
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      *
603 603
      * @return string
604 604
      */
605
-    private function getTargetField($meta, $parentMeta, $value)
605
+    private function getTargetField ($meta, $parentMeta, $value)
606 606
     {
607 607
         if (count($parentMeta->parentClasses) > 0) {
608 608
             foreach ($parentMeta->parentClasses as $classe) {
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
             return $field;
623 623
         }
624 624
 
625
-        return $meta->getIdentifierColumnNames()[0];
625
+        return $meta->getIdentifierColumnNames()[ 0 ];
626 626
     }
627 627
 
628 628
     /**
@@ -634,11 +634,11 @@  discard block
 block discarded – undo
634 634
      *
635 635
      * @return string
636 636
      */
637
-    private function searchAssociationField($associationsByTargetClass, $parentTable, $value)
637
+    private function searchAssociationField ($associationsByTargetClass, $parentTable, $value)
638 638
     {
639 639
         foreach ($associationsByTargetClass as $table => $association) {
640
-            if ($table == $parentTable && $association['inversedBy'] == $value) {
641
-                return $association['fieldName'];
640
+            if ($table == $parentTable && $association[ 'inversedBy' ] == $value) {
641
+                return $association[ 'fieldName' ];
642 642
             }
643 643
         }
644 644
     }
@@ -648,14 +648,14 @@  discard block
 block discarded – undo
648 648
      * @param string $expression
649 649
      * @param string $alias
650 650
      */
651
-    private function getSelectExpression($expression, $field, $alias, $fieldAlias = self::DEFAULT_TABLE_ALIAS)
651
+    private function getSelectExpression ($expression, $field, $alias, $fieldAlias = self::DEFAULT_TABLE_ALIAS)
652 652
     {
653
-        $validExpressions = ['SUM', 'MIN', 'MAX', 'AVG', 'COUNT'];
653
+        $validExpressions = [ 'SUM', 'MIN', 'MAX', 'AVG', 'COUNT' ];
654 654
         if (in_array(trim(strtoupper($expression)), $validExpressions)) {
655 655
             if (strpos($field, '.') === false) {
656 656
                 $field = getFullFieldName($field, $fieldAlias);
657 657
             }
658
-            $this->queryFields[] = sprintf('%s(%s) AS %s', $expression, $field, $alias);
658
+            $this->queryFields[ ] = sprintf('%s(%s) AS %s', $expression, $field, $alias);
659 659
         }
660 660
     }
661 661
 
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
      *
666 666
      * @return string
667 667
      */
668
-    protected function getFullFieldName($field, $alias = self::DEFAULT_TABLE_ALIAS, $separator = '.')
668
+    protected function getFullFieldName ($field, $alias = self::DEFAULT_TABLE_ALIAS, $separator = '.')
669 669
     {
670 670
         return sprintf('%s%s%s', $alias, $separator, $field);
671 671
     }
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
      * @param null   $value
677 677
      * @param string $alias
678 678
      */
679
-    protected function makeExpression($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
679
+    protected function makeExpression ($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS)
680 680
     {
681 681
         $originalValue = $value;
682 682
 
@@ -738,10 +738,10 @@  discard block
 block discarded – undo
738 738
                 $expression = $alias.' INSTANCE OF '.$value;
739 739
                 break;
740 740
             case 'between':
741
-                $expression = $this->queryBuilder->expr()->between($field, $this->queryBuilder->expr()->literal($value[0]), $this->queryBuilder->expr()->literal($value[1]));
741
+                $expression = $this->queryBuilder->expr()->between($field, $this->queryBuilder->expr()->literal($value[ 0 ]), $this->queryBuilder->expr()->literal($value[ 1 ]));
742 742
                 break;
743 743
             case 'dateparteq':
744
-                $expression = $this->queryBuilder->expr()->eq("DATEPART('".$value['format']."', ".$field.')', $value['value']);
744
+                $expression = $this->queryBuilder->expr()->eq("DATEPART('".$value[ 'format' ]."', ".$field.')', $value[ 'value' ]);
745 745
         }
746 746
 
747 747
         return $expression;
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
     /**
751 751
      * @return string
752 752
      */
753
-    protected function tableAlias()
753
+    protected function tableAlias ()
754 754
     {
755 755
         return self::DEFAULT_TABLE_ALIAS.count($this->queryBuilder->getAllAliases());
756 756
     }
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Providers/ORMServiceProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class ORMServiceProvider extends ServiceProvider
8 8
 {
9
-    public function register()
9
+    public function register ()
10 10
     {
11 11
         $this->app->register(\Bludata\Doctrine\Common\Providers\CommonServiceProvider::class);
12 12
         $this->app->register(\LaravelDoctrine\Extensions\GedmoExtensionsServiceProvider::class);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Illuminate\Support\ServiceProvider;
6 6
 
7
-class ORMServiceProvider extends ServiceProvider
8
-{
7
+class ORMServiceProvider extends ServiceProvider {
9 8
     public function register()
10 9
     {
11 10
         $this->app->register(\Bludata\Doctrine\Common\Providers\CommonServiceProvider::class);
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Traits/ToArrayTrait.php 4 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
     private function getPropertiesFillable(): array
32 32
     {
33 33
         $allProperties = $this->getRepository()
34
-                              ->getClassMetadata()
35
-                              ->getReflectionClass()
36
-                              ->getProperties();
34
+                                ->getClassMetadata()
35
+                                ->getReflectionClass()
36
+                                ->getProperties();
37 37
 
38 38
         return array_filter($allProperties, function ($property) {
39 39
             $existAnnotationToArray = array_filter((new AnnotationReader())->getPropertyAnnotations($property), function ($annotation) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function toArray(array $options = []): array
48 48
     {
49 49
         $classMetadata = $this->getRepository()
50
-                              ->getClassMetadata();
50
+                                ->getClassMetadata();
51 51
 
52 52
         $propertiesFillable = $this->getPropertiesFillable();
53 53
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,7 @@
 block discarded – undo
9 9
 use Doctrine\ORM\PersistentCollection;
10 10
 use ReflectionProperty;
11 11
 
12
-trait ToArrayTrait
13
-{
12
+trait ToArrayTrait {
14 13
     private function isOnly(ReflectionProperty $property, array $optionsToArray): bool
15 14
     {
16 15
         if (!isset($optionsToArray['only']) && !isset($optionsToArray['except'])) {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,24 +11,24 @@  discard block
 block discarded – undo
11 11
 
12 12
 trait ToArrayTrait
13 13
 {
14
-    private function isOnly(ReflectionProperty $property, array $optionsToArray): bool
14
+    private function isOnly (ReflectionProperty $property, array $optionsToArray): bool
15 15
     {
16
-        if (!isset($optionsToArray['only']) && !isset($optionsToArray['except'])) {
16
+        if (!isset($optionsToArray[ 'only' ]) && !isset($optionsToArray[ 'except' ])) {
17 17
             return true;
18 18
         }
19 19
 
20
-        if (isset($optionsToArray['only'])) {
21
-            if (in_array($property->getName(), $optionsToArray['only'])) {
20
+        if (isset($optionsToArray[ 'only' ])) {
21
+            if (in_array($property->getName(), $optionsToArray[ 'only' ])) {
22 22
                 return true;
23 23
             }
24
-        } elseif (isset($optionsToArray['except']) && !in_array($property->getName(), $optionsToArray['except'])) {
24
+        } elseif (isset($optionsToArray[ 'except' ]) && !in_array($property->getName(), $optionsToArray[ 'except' ])) {
25 25
             return true;
26 26
         }
27 27
 
28 28
         return false;
29 29
     }
30 30
 
31
-    private function getPropertiesFillable(): array
31
+    private function getPropertiesFillable (): array
32 32
     {
33 33
         $allProperties = $this->getRepository()
34 34
                               ->getClassMetadata()
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
         });
45 45
     }
46 46
 
47
-    public function toArray(array $options = []): array
47
+    public function toArray (array $options = [ ]): array
48 48
     {
49 49
         $classMetadata = $this->getRepository()
50 50
                               ->getClassMetadata();
51 51
 
52 52
         $propertiesFillable = $this->getPropertiesFillable();
53 53
 
54
-        $array = [];
54
+        $array = [ ];
55 55
 
56 56
         foreach ($propertiesFillable as $property) {
57 57
             if ($this->isOnly($property, $options)) {
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                             $dateFormat = 'Y-m-d';
65 65
 
66 66
                             if ($metaDataKey) {
67
-                                switch ($metaDataKey['type']) {
67
+                                switch ($metaDataKey[ 'type' ]) {
68 68
                                     case 'datetime':
69 69
                                         $dateFormat = 'Y-m-d H:i:s';
70 70
                                         break;
@@ -76,24 +76,24 @@  discard block
 block discarded – undo
76 76
                                 }
77 77
                             }
78 78
 
79
-                            $array[$key] = $this->$key->format($dateFormat);
79
+                            $array[ $key ] = $this->$key->format($dateFormat);
80 80
                         }
81 81
                     } elseif ($this->$key instanceof ArrayCollection || $this->$key instanceof PersistentCollection) {
82
-                        $array[$key] = array_map(function ($item) {
82
+                        $array[ $key ] = array_map(function ($item) {
83 83
                             return $item->getId();
84 84
                         }, $this->$key->getValues());
85 85
                     } else {
86 86
                         if (method_exists($this->$key, 'getId')) {
87
-                            $array[$key] = $this->$key->getId();
87
+                            $array[ $key ] = $this->$key->getId();
88 88
                         } else {
89
-                            $array[$key] = $this->$key;
89
+                            $array[ $key ] = $this->$key;
90 90
                         }
91 91
                     }
92 92
                 } else {
93
-                    if (in_array($metaDataKey['type'], ['decimal', 'float'])) {
94
-                        $array[$key] = (float) $this->$key;
93
+                    if (in_array($metaDataKey[ 'type' ], [ 'decimal', 'float' ])) {
94
+                        $array[ $key ] = (float) $this->$key;
95 95
                     } else {
96
-                        $array[$key] = $this->$key;
96
+                        $array[ $key ] = $this->$key;
97 97
                     }
98 98
                 }
99 99
             }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,18 +14,18 @@  discard block
 block discarded – undo
14 14
     private function isOnly(ReflectionProperty $property, array $optionsToArray): bool
15 15
     {
16 16
         if (!isset($optionsToArray['only']) && !isset($optionsToArray['except'])) {
17
-            return true;
17
+            return TRUE;
18 18
         }
19 19
 
20 20
         if (isset($optionsToArray['only'])) {
21 21
             if (in_array($property->getName(), $optionsToArray['only'])) {
22
-                return true;
22
+                return TRUE;
23 23
             }
24 24
         } elseif (isset($optionsToArray['except']) && !in_array($property->getName(), $optionsToArray['except'])) {
25
-            return true;
25
+            return TRUE;
26 26
         }
27 27
 
28
-        return false;
28
+        return FALSE;
29 29
     }
30 30
 
31 31
     private function getPropertiesFillable(): array
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         foreach ($propertiesFillable as $property) {
57 57
             if ($this->isOnly($property, $options)) {
58 58
                 $key = $property->getName();
59
-                $metaDataKey = $classMetadata->hasField($key) ? $classMetadata->getFieldMapping($key) : null;
59
+                $metaDataKey = $classMetadata->hasField($key) ? $classMetadata->getFieldMapping($key) : NULL;
60 60
 
61 61
                 if (is_object($this->$key)) {
62 62
                     if ($this->$key instanceof DateTime) {
Please login to merge, or discard this patch.
Bludata/Doctrine/ORM/Entities/BaseEntity.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
     public function persist(): BdContracts\EntityContract
126 126
     {
127 127
         $this->getRepository()
128
-             ->getEntityManager()
129
-             ->persist($this);
128
+                ->getEntityManager()
129
+                ->persist($this);
130 130
 
131 131
         return $this;
132 132
     }
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
     public function flush(): BdContracts\EntityContract
135 135
     {
136 136
         $this->getRepository()
137
-             ->getEntityManager()
138
-             ->flush($this);
137
+                ->getEntityManager()
138
+                ->flush($this);
139 139
 
140 140
         return $this;
141 141
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function remove(): BdContracts\EntityContract
144 144
     {
145 145
         $this->getRepository()
146
-             ->remove($this);
146
+                ->remove($this);
147 147
 
148 148
         return $this;
149 149
     }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -48,27 +48,27 @@  discard block
 block discarded – undo
48 48
      */
49 49
     protected $deletedAt;
50 50
 
51
-    public function getId()
51
+    public function getId ()
52 52
     {
53 53
         return $this->id;
54 54
     }
55 55
 
56
-    public function getCreatedAt(): ?DateTime
56
+    public function getCreatedAt (): ?DateTime
57 57
     {
58 58
         return $this->createdAt;
59 59
     }
60 60
 
61
-    public function getUpdatedAt(): ?DateTime
61
+    public function getUpdatedAt (): ?DateTime
62 62
     {
63 63
         return $this->createdAt;
64 64
     }
65 65
 
66
-    public function getDeletedAt(): ?DateTime
66
+    public function getDeletedAt (): ?DateTime
67 67
     {
68 68
         return $this->deletedAt;
69 69
     }
70 70
 
71
-    public function getRepository(): RepositoryContract
71
+    public function getRepository (): RepositoryContract
72 72
     {
73 73
         return EntityManager::getRepository(get_class($this));
74 74
     }
@@ -76,53 +76,53 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @ORM\PreRemove
78 78
      */
79
-    public function preRemove()
79
+    public function preRemove ()
80 80
     {
81 81
     }
82 82
 
83 83
     /**
84 84
      * @ORM\PostRemove
85 85
      */
86
-    public function postRemove()
86
+    public function postRemove ()
87 87
     {
88 88
     }
89 89
 
90 90
     /**
91 91
      * @ORM\PrePersist
92 92
      */
93
-    public function prePersist()
93
+    public function prePersist ()
94 94
     {
95 95
     }
96 96
 
97 97
     /**
98 98
      * @ORM\PostPersist
99 99
      */
100
-    public function postPersist()
100
+    public function postPersist ()
101 101
     {
102 102
     }
103 103
 
104 104
     /**
105 105
      * @ORM\PreUpdate
106 106
      */
107
-    public function preUpdate()
107
+    public function preUpdate ()
108 108
     {
109 109
     }
110 110
 
111 111
     /**
112 112
      * @ORM\PostUpdate
113 113
      */
114
-    public function postUpdate()
114
+    public function postUpdate ()
115 115
     {
116 116
     }
117 117
 
118 118
     /**
119 119
      * @ORM\PreFlush
120 120
      */
121
-    public function preFlush()
121
+    public function preFlush ()
122 122
     {
123 123
     }
124 124
 
125
-    public function persist(): BdContracts\EntityContract
125
+    public function persist (): BdContracts\EntityContract
126 126
     {
127 127
         $this->getRepository()
128 128
              ->getEntityManager()
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         return $this;
132 132
     }
133 133
 
134
-    public function flush(): BdContracts\EntityContract
134
+    public function flush (): BdContracts\EntityContract
135 135
     {
136 136
         $this->getRepository()
137 137
              ->getEntityManager()
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         return $this;
141 141
     }
142 142
 
143
-    public function remove(): BdContracts\EntityContract
143
+    public function remove (): BdContracts\EntityContract
144 144
     {
145 145
         $this->getRepository()
146 146
              ->remove($this);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         return $this;
149 149
     }
150 150
 
151
-    public function undelete(): BdContracts\EntityContract
151
+    public function undelete (): BdContracts\EntityContract
152 152
     {
153 153
         $this->deletedAt = null;
154 154
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 
151 151
     public function undelete(): BdContracts\EntityContract
152 152
     {
153
-        $this->deletedAt = null;
153
+        $this->deletedAt = NULL;
154 154
 
155 155
         $this->persist();
156 156
 
Please login to merge, or discard this patch.
resources/lang/pt-BR/validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return [];
3
+return [ ];
Please login to merge, or discard this patch.