Completed
Push — support/2.0 ( 978a1e...05f0de )
by Vítor
03:16
created
PPI/Console/Command/ModuleCommand.php 3 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -57,6 +57,10 @@
 block discarded – undo
57 57
         }
58 58
     }
59 59
 
60
+    /**
61
+     * @param string $src
62
+     * @param string $dst
63
+     */
60 64
     protected function copyRecursively($src, $dst)
61 65
     {
62 66
         $dir = opendir($src);
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@
 block discarded – undo
27 27
     {
28 28
 
29 29
         $this->setName('module:create')
30
-             ->setDescription('Create a module')
31
-             ->addArgument('name', InputArgument::REQUIRED, 'What is your module name?')
32
-             ->addOption('dir', null, InputOption::VALUE_NONE, 'Specify the modules directory');
30
+                ->setDescription('Create a module')
31
+                ->addArgument('name', InputArgument::REQUIRED, 'What is your module name?')
32
+                ->addOption('dir', null, InputOption::VALUE_NONE, 'Specify the modules directory');
33 33
     }
34 34
 
35 35
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@
 block discarded – undo
61 61
     {
62 62
         $dir = opendir($src);
63 63
         @mkdir($dst);
64
-        while (false !== ( $file = readdir($dir)) ) {
65
-            if (( $file != '.' ) && ( $file != '..' )) {
66
-                if ( is_dir($src . '/' . $file) ) {
67
-                    $this->copyRecursively($src . '/' . $file,$dst . '/' . $file);
64
+        while (false !== ($file = readdir($dir))) {
65
+            if (($file != '.') && ($file != '..')) {
66
+                if (is_dir($src . '/' . $file)) {
67
+                    $this->copyRecursively($src . '/' . $file, $dst . '/' . $file);
68 68
                 } else {
69
-                    copy($src . '/' . $file,$dst . '/' . $file);
69
+                    copy($src . '/' . $file, $dst . '/' . $file);
70 70
                 }
71 71
             }
72 72
         }
Please login to merge, or discard this patch.
PPI/DataSource/DataSourceInterface.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,6 @@
 block discarded – undo
21 21
     /**
22 22
      * Manufacturs datasource drivers.
23 23
      *
24
-     * @param string $key
25 24
      *
26 25
      * @return object
27 26
      *
Please login to merge, or discard this patch.
PPI/DataSource/PDO.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
  */
9 9
 namespace PPI\DataSource;
10 10
 
11
-use Doctrine\DBAL\DriverManager,
12
-    Doctrine\DBAL\Configuration;
11
+use Doctrine\DBAL\DriverManager;
12
+use Doctrine\DBAL\Configuration;
13 13
 
14 14
 /**
15 15
  * PDO class
Please login to merge, or discard this patch.
PPI/Exception/Log.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      *
38 38
      * @param array $options
39 39
      *
40
-     * @return void
40
+     * @return HandlerInterface
41 41
      */
42 42
     public function __construct(array $options = array())
43 43
     {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     /**
64 64
      * Get the log file path
65 65
      *
66
-     * @return mixed
66
+     * @return string
67 67
      */
68 68
     private function getLogFile()
69 69
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
                 $e->getLine()
91 91
             );
92 92
 
93
-            if (file_put_contents($logFile, $logEntry , FILE_APPEND|LOCK_EX) > 0) {
93
+            if (file_put_contents($logFile, $logEntry, FILE_APPEND | LOCK_EX) > 0) {
94 94
                 return array(
95 95
                     'status'  => true,
96 96
                     'message' => 'Written to log file ' . $logFile
Please login to merge, or discard this patch.
PPI/Module/Controller.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -458,7 +458,7 @@
 block discarded – undo
458 458
      * Get an option from the controller.
459 459
      *
460 460
      * @param string $option  The option name
461
-     * @param null   $default The default value if the option does not exist
461
+     * @param string   $default The default value if the option does not exist
462 462
      *
463 463
      * @return mixed
464 464
      */
Please login to merge, or discard this patch.
Switch Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -254,34 +254,34 @@
 block discarded – undo
254 254
     {
255 255
         switch ($key = strtolower($key)) {
256 256
 
257
-            case 'ajax':
258
-                if (!isset($this->_isCache['ajax'])) {
259
-                    return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest();
260
-                }
261
-
262
-                return $this->_isCache['ajax'];
263
-
264
-            case 'put':
265
-            case 'delete':
266
-            case 'post':
267
-            case 'patch':
268
-                if (!isset($this->_isCache['requestMethod'][$key])) {
269
-                    $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key);
270
-                }
271
-
272
-                return $this->_isCache['requestMethod'][$key];
273
-
274
-            case 'ssl':
275
-            case 'https':
276
-            case 'secure':
277
-                if (!isset($this->_isCache['secure'])) {
278
-                    $this->_isCache['secure'] = $this->getService('request')->isSecure();
279
-                }
280
-
281
-                return $this->_isCache['secure'];
282
-
283
-            default:
284
-                throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
257
+        case 'ajax':
258
+            if (!isset($this->_isCache['ajax'])) {
259
+                return $this->_isCache['ajax'] = $this->getService('request')->isXmlHttpRequest();
260
+            }
261
+
262
+            return $this->_isCache['ajax'];
263
+
264
+        case 'put':
265
+        case 'delete':
266
+        case 'post':
267
+        case 'patch':
268
+            if (!isset($this->_isCache['requestMethod'][$key])) {
269
+                $this->_isCache['requestMethod'][$key] = $this->getService('request')->getMethod() === strtoupper($key);
270
+            }
271
+
272
+            return $this->_isCache['requestMethod'][$key];
273
+
274
+        case 'ssl':
275
+        case 'https':
276
+        case 'secure':
277
+            if (!isset($this->_isCache['secure'])) {
278
+                $this->_isCache['secure'] = $this->getService('request')->isSecure();
279
+            }
280
+
281
+            return $this->_isCache['secure'];
282
+
283
+        default:
284
+            throw new \InvalidArgumentException("Invalid 'is' key supplied: {$key}");
285 285
 
286 286
         }
287 287
 
Please login to merge, or discard this patch.
PPI/Module/Listener/DefaultListenerAggregate.php 1 patch
Unused Use Statements   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@
 block discarded – undo
8 8
  */
9 9
 namespace PPI\Module\Listener;
10 10
 
11
-use PPI\ServiceManager\ServiceManager,
12
-    Zend\EventManager\EventManagerInterface,
13
-    Zend\Loader\ModuleAutoloader,
14
-    Zend\ModuleManager\Listener\AutoloaderListener,
15
-    Zend\ModuleManager\Listener\DefaultListenerAggregate as ZendDefaultListenerAggregate,
16
-    Zend\ModuleManager\Listener\InitTrigger,
17
-    Zend\ModuleManager\Listener\ModuleResolverListener,
18
-    Zend\ModuleManager\ModuleEvent,
19
-    Zend\Stdlib\ArrayUtils;
11
+use PPI\ServiceManager\ServiceManager;
12
+use Zend\EventManager\EventManagerInterface;
13
+use Zend\Loader\ModuleAutoloader;
14
+use Zend\ModuleManager\Listener\AutoloaderListener;
15
+use Zend\ModuleManager\Listener\DefaultListenerAggregate as ZendDefaultListenerAggregate;
16
+use Zend\ModuleManager\Listener\InitTrigger;
17
+use Zend\ModuleManager\Listener\ModuleResolverListener;
18
+use Zend\ModuleManager\ModuleEvent;
19
+use Zend\Stdlib\ArrayUtils;
20 20
 
21 21
 /**
22 22
  * DefaultListenerAggregate class
Please login to merge, or discard this patch.
PPI/Module/Module.php 3 patches
Unused Use Statements   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@
 block discarded – undo
8 8
  */
9 9
 namespace PPI\Module;
10 10
 
11
-use PPI\Module\Routing\Loader\YamlFileLoader,
12
-    Symfony\Component\Config\FileLocator,
13
-    Symfony\Component\Yaml\Yaml as YamlParser;
11
+use PPI\Module\Routing\Loader\YamlFileLoader;
12
+use Symfony\Component\Config\FileLocator;
13
+use Symfony\Component\Yaml\Yaml as YamlParser;
14 14
 
15 15
 /**
16 16
  * The base PPI module class..
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
     {
225 225
         if (!method_exists($this->_controller, $this->_actionName)) {
226 226
             throw new \Exception(sprintf(
227
-                'Unable to dispatch action: "%s" does not exist in controller '.
227
+                'Unable to dispatch action: "%s" does not exist in controller ' .
228 228
                 '"%s" within module "%s"',
229 229
                 $this->_actionName,
230 230
                 $this->_controllerName,
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This file is part of the PPI Framework.
4
- *
5
- * @copyright  Copyright (c) 2012 Paul Dragoonis <[email protected]>
6
- * @license    http://opensource.org/licenses/mit-license.php MIT
7
- * @link       http://www.ppi.io
8
- */
3
+     * This file is part of the PPI Framework.
4
+     *
5
+     * @copyright  Copyright (c) 2012 Paul Dragoonis <[email protected]>
6
+     * @license    http://opensource.org/licenses/mit-license.php MIT
7
+     * @link       http://www.ppi.io
8
+     */
9 9
 namespace PPI\Exception;
10 10
 
11 11
 /**
Please login to merge, or discard this patch.
PPI/Module/Routing/Loader/YamlFileLoader.php 1 patch
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
  */
9 9
 namespace PPI\Module\Routing\Loader;
10 10
 
11
-use Symfony\Component\Routing\Loader\YamlFileLoader as BaseYamlFileLoader,
12
-    Symfony\Component\Routing\RouteCollection;
11
+use Symfony\Component\Routing\Loader\YamlFileLoader as BaseYamlFileLoader;
12
+use Symfony\Component\Routing\RouteCollection;
13 13
 
14 14
 /**
15 15
  * YamlFileLoader class
Please login to merge, or discard this patch.
PPI/Module/Routing/Router.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      * Constructor.
25 25
      *
26 26
      * @param RequestContext $requestContext
27
-     * @param type           $collection
27
+     * @param \Symfony\Component\Routing\RouteCollection           $collection
28 28
      * @param array          $options
29 29
      *
30 30
      * @return void
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     /**
42 42
      * Set the route collection
43 43
      *
44
-     * @param type $collection
44
+     * @param \Symfony\Component\Routing\RouteCollection $collection
45 45
      *
46 46
      * @return void
47 47
      */
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
  */
9 9
 namespace PPI\Module\Routing;
10 10
 
11
-use Symfony\Component\Routing\Router as BaseRouter,
12
-    Symfony\Component\Routing\RequestContext;
11
+use Symfony\Component\Routing\Router as BaseRouter;
12
+use Symfony\Component\Routing\RequestContext;
13 13
 
14 14
 /**
15 15
  * The PPI router
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     public function isMatcherCached()
59 59
     {
60 60
         return file_exists(
61
-            $this->options['cache_dir'].
62
-            DIRECTORY_SEPARATOR.
63
-            $this->options['matcher_cache_class'].
61
+            $this->options['cache_dir'] .
62
+            DIRECTORY_SEPARATOR .
63
+            $this->options['matcher_cache_class'] .
64 64
             '.php'
65 65
         );
66 66
     }
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
     public function isGeneratorCached()
74 74
     {
75 75
         return file_exists(
76
-            $this->options['cache_dir'].
77
-            DIRECTORY_SEPARATOR.
78
-            $this->options['generator_cache_class'].
76
+            $this->options['cache_dir'] .
77
+            DIRECTORY_SEPARATOR .
78
+            $this->options['generator_cache_class'] .
79 79
             '.php'
80 80
         );
81 81
     }
Please login to merge, or discard this patch.