Passed
Branch master (864145)
by Muhammed
18:23
created
src/Zicht/Bundle/UrlBundle/Aliasing/Aliasing.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 namespace Zicht\Bundle\UrlBundle\Aliasing;
8 8
 
9 9
 use Doctrine\ORM\EntityManager;
10
-use Symfony\Component\HttpFoundation\Request;
11 10
 use Zicht\Bundle\UrlBundle\Aliasing\Mapper\UrlMapperInterface;
12 11
 use Zicht\Bundle\UrlBundle\Entity\Repository\UrlAliasRepository;
13 12
 use Zicht\Bundle\UrlBundle\Entity\UrlAlias;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,21 +23,21 @@  discard block
 block discarded – undo
23 23
      *
24 24
      * @see addAlias
25 25
      */
26
-    const STRATEGY_OVERWRITE    = 'overwrite';
26
+    const STRATEGY_OVERWRITE = 'overwrite';
27 27
 
28 28
     /**
29 29
      * Keep existing aliases and do nothing
30 30
      *
31 31
      * @see addAlias
32 32
      */
33
-    const STRATEGY_KEEP         = 'keep';
33
+    const STRATEGY_KEEP = 'keep';
34 34
 
35 35
     /**
36 36
      * Suffix existing aliases.
37 37
      *
38 38
      * @see addAlias
39 39
      */
40
-    const STRATEGY_SUFFIX       = 'suffix';
40
+    const STRATEGY_SUFFIX = 'suffix';
41 41
 
42 42
     /**
43 43
      * @see AddAlias
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                         $original = $publicUrl;
278 278
                         $i = 1;
279 279
                         do {
280
-                            $publicUrl = $original . '-' . ($i++);
280
+                            $publicUrl = $original.'-'.($i++);
281 281
                         } while ($this->hasInternalAlias($publicUrl));
282 282
 
283 283
                         $alias = new UrlAlias($publicUrl, $internalUrl, $type);
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         $this->isBatch = $isBatch;
356 356
         $mgr = $this->manager;
357 357
         $self = $this;
358
-        return function () use ($mgr, $self) {
358
+        return function() use ($mgr, $self) {
359 359
             $mgr->flush();
360 360
             $self->setIsBatch(true);
361 361
         };
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $this->manager->persist($alias);
374 374
 
375 375
         if ($this->isBatch) {
376
-            $this->batch[$alias->getPublicUrl()]= $alias;
376
+            $this->batch[$alias->getPublicUrl()] = $alias;
377 377
         } else {
378 378
             $this->manager->flush($alias);
379 379
         }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
             join(
449 449
                 ', ',
450 450
                 array_map(
451
-                    function ($v) use ($connection) {
451
+                    function($v) use ($connection) {
452 452
                         return $connection->quote($v, \PDO::PARAM_STR);
453 453
                     },
454 454
                     $urls
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -347,7 +347,7 @@
 block discarded – undo
347 347
      * This method returns a callback that needs to be executed after the batch is done; this is up to the caller.
348 348
      *
349 349
      * @param bool $isBatch
350
-     * @return callable
350
+     * @return \Closure
351 351
      */
352 352
     public function setIsBatch($isBatch)
353 353
     {
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Entity/StaticReference.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
     }
151 151
 
152 152
     /**
153
-     * @return mixed
153
+     * @return StaticReferenceTranslation[]
154 154
      */
155 155
     public function getTranslations()
156 156
     {
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Url/Params/UriParser.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      * Proxy method for translateKeyInput() of the translator
145 145
      *
146 146
      * @param string $keyName
147
-     * @return bool
147
+     * @return string|false
148 148
      */
149 149
     final public function translateKeyInput($keyName)
150 150
     {
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      *
162 162
      * @param string $keyName
163 163
      * @param mixed $value
164
-     * @return bool
164
+     * @return string|false
165 165
      */
166 166
     final public function translateValueInput($keyName, $value)
167 167
     {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      * Proxy method for translateKeyOutput() of the translator
178 178
      *
179 179
      * @param string $keyName
180
-     * @return bool
180
+     * @return string|false
181 181
      */
182 182
     final public function translateKeyOutput($keyName)
183 183
     {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      *
194 194
      * @param string $keyName
195 195
      * @param string $value
196
-     * @return bool
196
+     * @return string|false
197 197
      */
198 198
     final public function translateValueOutput($keyName, $value)
199 199
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
             if ($external = $this->translateKeyOutput($param)) {
122 122
                 $param = $external;
123 123
             }
124
-            $ret .= $param . $this->seperators['key_value'];
124
+            $ret .= $param.$this->seperators['key_value'];
125 125
             $firstValue = true;
126 126
             foreach ($values as $value) {
127 127
                 if ($external = $this->translateValueOutput($internal, $value)) {
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/DependencyInjection/Configuration.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,10 +22,10 @@
 block discarded – undo
22 22
         $treeBuilder = new TreeBuilder();
23 23
         $rootNode = $treeBuilder->root('zicht_url');
24 24
 
25
-        $isBool = function ($v) {
25
+        $isBool = function($v) {
26 26
             return is_bool($v);
27 27
         };
28
-        $convertToEnabledKey = function ($v) {
28
+        $convertToEnabledKey = function($v) {
29 29
             return array('enabled' => $v);
30 30
         };
31 31
 
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/DependencyInjection/ZichtUrlExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     public function load(array $configs, ContainerBuilder $container)
29 29
     {
30
-        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
30
+        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
31 31
         $loader->load('services.xml');
32 32
 
33 33
         $config = $this->processConfiguration(new Configuration(), $configs);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         }
72 72
 
73 73
         $formResources = $container->getParameter('twig.form.resources');
74
-        $formResources[]= 'ZichtUrlBundle::form_theme.html.twig';
74
+        $formResources[] = 'ZichtUrlBundle::form_theme.html.twig';
75 75
         $container->setParameter('twig.form.resources', $formResources);
76 76
     }
77 77
 
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Entity/ErrorLog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
     public function __toString()
96 96
     {
97 97
         return (string)$this->message
98
-            . ' @ ' . (string)($this->date_created ? $this->date_created->format('YmdHis') : '');
98
+            . ' @ '.(string)($this->date_created ? $this->date_created->format('YmdHis') : '');
99 99
     }
100 100
 
101 101
     /**
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Entity/Repository/UrlAliasRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     {
22 22
         $where = ['public_url' => $publicUrl];
23 23
         if (null !== $mode) {
24
-            $where['mode']= $mode;
24
+            $where['mode'] = $mode;
25 25
         }
26 26
         return $this->findOneBy($where);
27 27
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $where = ['internal_url' => $internalUrl];
35 35
         if (null !== $mode) {
36
-            $where['mode']= $mode;
36
+            $where['mode'] = $mode;
37 37
         }
38 38
         return $this->findOneBy($where);
39 39
     }
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Entity/UrlAlias.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@
 block discarded – undo
25 25
      * The alias is an internal rewrite, i.e. external url's are rewritten to internal on request,
26 26
      * and vice versa when composing an url.
27 27
      */
28
-    const REWRITE   = 0;
28
+    const REWRITE = 0;
29 29
 
30 30
     /**
31 31
      * The MOVE type yields a 301 response with the internal url if the public url is matched
32 32
      */
33
-    const MOVE      = 301;
33
+    const MOVE = 301;
34 34
 
35 35
     /**
36 36
      * The ALIAS type yields a 302 response with the internal url if the public url is matched
37 37
      */
38
-    const ALIAS     = 302;
38
+    const ALIAS = 302;
39 39
 
40 40
     /**
41 41
      * @ORM\Id
Please login to merge, or discard this patch.
src/Zicht/Bundle/UrlBundle/Form/Extension/TinymceTypeExtension.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     public function getExtendedType()
42 42
     {
43
-       return TinymceTypeExtension::class;
43
+        return TinymceTypeExtension::class;
44 44
     }
45 45
 
46 46
     /**
Please login to merge, or discard this patch.