@@ -18,7 +18,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -44,7 +44,7 @@ |
||
| 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 | |
@@ -244,7 +244,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -81,7 +81,7 @@ |
||
| 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 | } |
@@ -38,8 +38,8 @@ discard block |
||
| 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 |
||
| 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 | |