Completed
Push — master ( d4f9db...ec4c85 )
by Thibaud
15:08
created
src/Bundle/DependencyInjection/Builder/CacheDefinitionBuilder.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Alchemy\PhraseanetBundle\DependencyInjection\Builder;
4 4
 
5 5
 use Doctrine\Common\Cache\ArrayCache;
6
-use Doctrine\Common\Cache\FileCache;
7 6
 use Doctrine\Common\Cache\MemcachedCache;
8 7
 use Doctrine\Common\Cache\PhpFileCache;
9 8
 use Doctrine\Common\Cache\RedisCache;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Component/EntityManagerFactory.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use ProxyManager\Configuration;
8 8
 use ProxyManager\Factory\LazyLoadingValueHolderFactory;
9 9
 use ProxyManager\Proxy\LazyLoadingInterface;
10
-use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
11 10
 
12 11
 class EntityManagerFactory
13 12
 {
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
     /**
79 79
      * @param $name
80
-     * @return \PhraseanetSDK\AbstractRepository
80
+     * @return \ProxyManager\Proxy\VirtualProxyInterface
81 81
      */
82 82
     public function getRepository($name)
83 83
     {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     /**
110 110
      * Builds the options array used to build SDK entity managers
111 111
      *
112
-     * @return array
112
+     * @return string
113 113
      */
114 114
     private function getOptions()
115 115
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             return true;
98 98
         };
99 99
 
100
-        $class = 'PhraseanetSDK\Repository\\' . ucfirst($name);
100
+        $class = 'PhraseanetSDK\Repository\\'.ucfirst($name);
101 101
 
102 102
         if ($name == 'search') {
103 103
             $class = SearchRepository::class;
Please login to merge, or discard this patch.
src/Bundle/DependencyInjection/Configuration/CacheNodeBuilder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Bundle/Twig/PhraseanetExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     public function getFunctions()
23 23
     {
24 24
         return array(
25
-            new \Twig_SimpleFunction('record_hash', [ $this, 'getRecordHash' ]),
25
+            new \Twig_SimpleFunction('record_hash', [$this, 'getRecordHash']),
26 26
             new \Twig_SimpleFunction('record_caption', [$this, 'getRecordCaption']),
27 27
             new \Twig_SimpleFunction('story_caption', [$this, 'getStoryCaption']),
28 28
             new \Twig_SimpleFunction('fetch_thumbnail', [$this, 'fetchThumbnail']),
Please login to merge, or discard this patch.
src/Component/Helper/FeedEntryFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
src/Component/Helper/FeedHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Component/Helper/InstanceHelperRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Component/Helper/ThumbHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
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.