Completed
Push — master ( 8004f9...06b653 )
by Thibaud
04:58 queued 02:39
created
src/Component/Mapping/FieldMap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
         foreach ($mappings as $alias => $localizedFields) {
30 30
             foreach ($localizedFields as $locale => $localizedField) {
31
-                if (! isset($this->fieldMap[$locale])) {
31
+                if (!isset($this->fieldMap[$locale])) {
32 32
                     $this->fieldMap[$locale] = array();
33 33
                 }
34 34
 
@@ -75,13 +75,13 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function getAliasFromFieldName($key, $locale)
77 77
     {
78
-        if (! isset($this->fieldMap[$locale])) {
78
+        if (!isset($this->fieldMap[$locale])) {
79 79
             throw new \OutOfBoundsException();
80 80
         }
81 81
 
82 82
         $flipped = array_flip($this->fieldMap[$locale]);
83 83
 
84
-        if (! isset($flipped[$key])) {
84
+        if (!isset($flipped[$key])) {
85 85
             throw new \OutOfBoundsException();
86 86
         }
87 87
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     public function isFieldMapped($key, $locale)
92 92
     {
93
-        if (! isset($this->fieldMap[$locale])) {
93
+        if (!isset($this->fieldMap[$locale])) {
94 94
             return false;
95 95
         }
96 96
 
Please login to merge, or discard this patch.
src/Component/Predicate/PredicateBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function where($expression)
20 20
     {
21
-        if (! $expression instanceof Predicate) {
21
+        if (!$expression instanceof Predicate) {
22 22
             $expression = new LiteralPredicate($expression);
23 23
         }
24 24
 
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function andWhere($expression)
32 32
     {
33
-        if (! $expression instanceof Predicate) {
33
+        if (!$expression instanceof Predicate) {
34 34
             $expression = new LiteralPredicate($expression);
35 35
         }
36 36
 
37
-        if ($this->predicateStack->count() > 1  && ! $this->predicateStack->top() instanceof AndPredicate) {
37
+        if ($this->predicateStack->count() > 1 && !$this->predicateStack->top() instanceof AndPredicate) {
38 38
             $this->startAndGroup();
39 39
         }
40 40
 
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
     public function orWhere($expression)
48 48
     {
49
-        if (! $expression instanceof Predicate) {
49
+        if (!$expression instanceof Predicate) {
50 50
             $expression = new LiteralPredicate($expression);
51 51
         }
52 52
 
53
-        if ($this->predicateStack->count() > 1  && ! $this->predicateStack->top() instanceof OrPredicate) {
53
+        if ($this->predicateStack->count() > 1 && !$this->predicateStack->top() instanceof OrPredicate) {
54 54
             $this->startOrGroup();
55 55
         }
56 56
 
Please login to merge, or discard this patch.
src/Component/Query/RecordQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      */
45 45
     public function execute($repository)
46 46
     {
47
-        if (! $repository instanceof Record && ! $repository instanceof Story) {
47
+        if (!$repository instanceof Record && !$repository instanceof Story) {
48 48
             throw new \InvalidArgumentException('Invalid repository type (story or record required).');
49 49
         }
50 50
 
Please login to merge, or discard this patch.
src/Component/Query/RecordQueryBuilder.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             self::RECORD_TYPE_VIDEO
245 245
         );
246 246
 
247
-        if (! in_array($recordType, $allowedTypes, true)) {
247
+        if (!in_array($recordType, $allowedTypes, true)) {
248 248
             throw new \InvalidArgumentException(
249 249
                 sprintf('Record type must be one of the RECORD_TYPE_* values, %s given.', $recordType)
250 250
             );
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             self::SEARCH_STORIES
270 270
         );
271 271
 
272
-        if (! in_array($searchType, $allowedTypes, true)) {
272
+        if (!in_array($searchType, $allowedTypes, true)) {
273 273
             throw new \InvalidArgumentException('Search type must be one of the SEARCH_* values');
274 274
         }
275 275
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 
366 366
     private function validateFieldName($fieldName, $errorMessage)
367 367
     {
368
-        if (! is_string($fieldName) || trim($fieldName) === '') {
368
+        if (!is_string($fieldName) || trim($fieldName) === '') {
369 369
             throw new \InvalidArgumentException($errorMessage);
370 370
         }
371 371
     }
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
     private function buildQueryTerm()
430 430
     {
431
-        if (! $this->conditionBuilder) {
431
+        if (!$this->conditionBuilder) {
432 432
             return $this->query;
433 433
         }
434 434
 
Please login to merge, or discard this patch.
src/Component/Helper/MetadataHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
             $locale = $this->defaultLocale;
82 82
         }
83 83
 
84
-        if (! $this->fieldsMap->hasAlias($field, $locale)) {
84
+        if (!$this->fieldsMap->hasAlias($field, $locale)) {
85 85
             if ($locale !== $this->defaultLocale) {
86 86
                 return $this->getStoryField($story, $field, $this->defaultLocale);
87 87
             }
Please login to merge, or discard this patch.
src/Component/Mapping/DefinitionMap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function addMapping($definition, $subDefinition)
40 40
     {
41
-        if (!  is_array($subDefinition)) {
42
-            $subDefinition = [ 'default' => $subDefinition ];
41
+        if (!is_array($subDefinition)) {
42
+            $subDefinition = ['default' => $subDefinition];
43 43
         }
44 44
 
45 45
         $this->map[$definition] = $subDefinition;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getSubDefinition($definition, $type = null)
68 68
     {
69
-        if (! $this->hasSubDefinition($definition, $type)) {
69
+        if (!$this->hasSubDefinition($definition, $type)) {
70 70
             throw new \OutOfBoundsException(sprintf('No subdef configured for definition "%s".', $definition));
71 71
         }
72 72
 
Please login to merge, or discard this patch.