| @@ -62,7 +62,7 @@ discard block | ||
| 62 | 62 | $cacheConfiguration['validation'] | 
| 63 | 63 | ]); | 
| 64 | 64 | |
| 65 | - $revalidation->setFactory([ $factory, 'create' ]); | |
| 65 | + $revalidation->setFactory([$factory, 'create']); | |
| 66 | 66 | |
| 67 | 67 | return $revalidation; | 
| 68 | 68 | } | 
| @@ -76,7 +76,7 @@ discard block | ||
| 76 | 76 | ]); | 
| 77 | 77 | |
| 78 | 78 | $definition = new Definition(RedisCache::class); | 
| 79 | -        $definition->addMethodCall('setRedis', [ $redisDefinition ]); | |
| 79 | +        $definition->addMethodCall('setRedis', [$redisDefinition]); | |
| 80 | 80 | |
| 81 | 81 | return $definition; | 
| 82 | 82 | } | 
| @@ -90,7 +90,7 @@ discard block | ||
| 90 | 90 | ]); | 
| 91 | 91 | |
| 92 | 92 | $definition = new Definition(MemcachedCache::class); | 
| 93 | -        $definition->addMethodCall('setMemcached', [ $memcachedDefinition ]); | |
| 93 | +        $definition->addMethodCall('setMemcached', [$memcachedDefinition]); | |
| 94 | 94 | |
| 95 | 95 | return $definition; | 
| 96 | 96 | } | 
| @@ -40,17 +40,17 @@ discard block | ||
| 40 | 40 |              ->scalarNode('ttl') | 
| 41 | 41 | ->validate() | 
| 42 | 42 |                  ->ifTrue(function ($value) { | 
| 43 | - return ! is_int($value) || $value < 0; | |
| 43 | + return !is_int($value) || $value < 0; | |
| 44 | 44 | }) | 
| 45 | 45 |                  ->thenInvalid('TTL must be a non-negative integer') | 
| 46 | 46 | ->end() | 
| 47 | 47 | ->end() | 
| 48 | 48 |              ->enumNode('type') | 
| 49 | - ->values([ null, 'none', 'array', 'file', 'redis', 'memcached' ]) | |
| 49 | + ->values([null, 'none', 'array', 'file', 'redis', 'memcached']) | |
| 50 | 50 |                  ->treatNullLike('none') | 
| 51 | 51 | ->end() | 
| 52 | 52 |              ->enumNode('validation') | 
| 53 | - ->values([ 'skip', 'deny' ]) | |
| 53 | + ->values(['skip', 'deny']) | |
| 54 | 54 | ->end(); | 
| 55 | 55 | |
| 56 | 56 | |
| @@ -59,7 +59,7 @@ discard block | ||
| 59 | 59 | |
| 60 | 60 | private function validate($value) | 
| 61 | 61 |      { | 
| 62 | -        if (! is_array($value)) { | |
| 62 | +        if (!is_array($value)) { | |
| 63 | 63 | return $value; | 
| 64 | 64 | } | 
| 65 | 65 | |
| @@ -67,11 +67,11 @@ discard block | ||
| 67 | 67 | $this->validateServerCache($value['type'], $value); | 
| 68 | 68 | } | 
| 69 | 69 | |
| 70 | -        if ($value['type'] == 'file' && ! isset($value['path'])) { | |
| 70 | +        if ($value['type'] == 'file' && !isset($value['path'])) { | |
| 71 | 71 |              throw new \InvalidArgumentException("'path' property is required for 'file' cache"); | 
| 72 | 72 | } | 
| 73 | 73 | |
| 74 | -        if ($value['type'] !== 'none' && ! isset($value['validation'])) { | |
| 74 | +        if ($value['type'] !== 'none' && !isset($value['validation'])) { | |
| 75 | 75 |              throw new \InvalidArgumentException("'validation' property is required when cache is enabled."); | 
| 76 | 76 | } | 
| 77 | 77 | |
| @@ -80,11 +80,11 @@ discard block | ||
| 80 | 80 | |
| 81 | 81 | private function validateServerCache($type, $value) | 
| 82 | 82 |      { | 
| 83 | -        if (! isset($value['host'])) { | |
| 83 | +        if (!isset($value['host'])) { | |
| 84 | 84 |              throw new \InvalidArgumentException("'host' is required for '$type' cache"); | 
| 85 | 85 | } | 
| 86 | 86 | |
| 87 | -        if (! isset($value['port'])) { | |
| 87 | +        if (!isset($value['port'])) { | |
| 88 | 88 |              throw new \InvalidArgumentException("'port' is required for '$type' cache"); | 
| 89 | 89 | } | 
| 90 | 90 | } | 
| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | */ | 
| 33 | 33 | public function hasItems() | 
| 34 | 34 |      { | 
| 35 | - return ! empty($this->getItems()); | |
| 35 | + return !empty($this->getItems()); | |
| 36 | 36 | } | 
| 37 | 37 | |
| 38 | 38 | /** | 
| @@ -19,7 +19,7 @@ | ||
| 19 | 19 | |
| 20 | 20 | public function entryContainsPdfDocuments(FeedEntry $feedEntry) | 
| 21 | 21 |      { | 
| 22 | - return ! empty($this->filterPdfItems($feedEntry)); | |
| 22 | + return !empty($this->filterPdfItems($feedEntry)); | |
| 23 | 23 | } | 
| 24 | 24 | |
| 25 | 25 | public function filterPdfItems(FeedEntry $feedEntry) | 
| @@ -28,7 +28,7 @@ | ||
| 28 | 28 | return $this->getDefaultHelper(); | 
| 29 | 29 | } | 
| 30 | 30 | |
| 31 | -        if (! $this->hasHelper($name)) { | |
| 31 | +        if (!$this->hasHelper($name)) { | |
| 32 | 32 |              throw new \OutOfBoundsException("Helper '$name' is not defined."); | 
| 33 | 33 | } | 
| 34 | 34 | |
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 | throw new \InvalidArgumentException(); | 
| 39 | 39 | } | 
| 40 | 40 | |
| 41 | -        if (! $this->thumbnailMap->hasSubDefinition($type) || $record instanceof Story) { | |
| 41 | +        if (!$this->thumbnailMap->hasSubDefinition($type) || $record instanceof Story) { | |
| 42 | 42 | return $record->getThumbnail(); | 
| 43 | 43 | } | 
| 44 | 44 | |
| @@ -28,7 +28,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | |
| @@ -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 | |