Passed
Push — master ( 945884...0c08bd )
by Danny
04:15
created
src/Command/ConfigureCommand.php 2 patches
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,8 @@
 block discarded – undo
57 57
     /**
58 58
      * Create project directory.
59 59
      *
60
-     * @return InitCommand
60
+     * @param string $directory
61
+     * @return ConfigureCommand
61 62
      */
62 63
     protected function createProjectDirectory($directory, OutputInterface $output)
63 64
     {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@
 block discarded – undo
18 18
     protected function configure()
19 19
     {
20 20
         $this->setName('configure')
21
-             ->setDescription('Creates a new project directory and configuration.')
22
-             ->addArgument('project-name', InputArgument::OPTIONAL, 'The project name.')
23
-             ->addOption(
24
-                 'global',
25
-                 null,
26
-                 InputOption::VALUE_NONE,
27
-                 'Creates the global configuration if it does not already exist.'
28
-             );
21
+                ->setDescription('Creates a new project directory and configuration.')
22
+                ->addArgument('project-name', InputArgument::OPTIONAL, 'The project name.')
23
+                ->addOption(
24
+                    'global',
25
+                    null,
26
+                    InputOption::VALUE_NONE,
27
+                    'Creates the global configuration if it does not already exist.'
28
+                );
29 29
     }
30 30
 
31 31
     /**
Please login to merge, or discard this patch.
src/Option/Configuration.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -118,6 +118,7 @@
 block discarded – undo
118 118
     /**
119 119
      * Configuration skeleton
120 120
      *
121
+     * @param string $name
121 122
      * @return string
122 123
      */
123 124
     protected static function configSkeleton($name, InputInterface $input, OutputInterface $output, QuestionHelper $helper)
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
         $plugins = [];
158 158
         foreach ($config['plugins'] as $plugin) {
159 159
             $key = $plugin['plugin'];
160
-            $plugins[ $key ] = $plugin;
160
+            $plugins[$key] = $plugin;
161 161
         }
162 162
 
163 163
         $config['plugins'] = array_values($plugins);
Please login to merge, or discard this patch.
src/WPCLI/Plugin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public static function pluginInstall($plugin, $activate = true, $version = null)
71 71
     {
72
-        $options = [ 'force' => '' ];
72
+        $options = ['force' => ''];
73 73
 
74 74
         if ($activate) {
75 75
             $options['activate'] = '';
Please login to merge, or discard this patch.
src/WPCLI/CLI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     protected static function execOptions($options)
33 33
     {
34
-        $options = array_map(function ($key, $value) {
34
+        $options = array_map(function($key, $value) {
35 35
             if ($value) {
36 36
                 return "--{$key}='{$value}'";
37 37
             }
Please login to merge, or discard this patch.
src/Option/Validator.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         $question = new Question("{$message}{$questionValue}: ", $value);
73 73
         $question->setValidator(function ($answer) use ($message) {
74 74
             if (!$answer) {
75
-                 throw new RuntimeException("{$message} is required!");
75
+                    throw new RuntimeException("{$message} is required!");
76 76
             }
77 77
 
78 78
             return $answer;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         // For now all validation is 2 levels deep so this should be good for now.
43 43
         $keys = explode(':', $ruleKey);
44
-        $config[ $keys[0] ][ $keys[1] ] = $value;
44
+        $config[$keys[0]][$keys[1]] = $value;
45 45
 
46 46
         return $config;
47 47
     }
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         // Ask the question.
71 71
         $questionValue = $value ? " (<info>{$value}</info>)" : '';
72 72
         $question = new Question("{$message}{$questionValue}: ", $value);
73
-        $question->setValidator(function ($answer) use ($message) {
73
+        $question->setValidator(function($answer) use ($message) {
74 74
             if (!$answer) {
75 75
                  throw new RuntimeException("{$message} is required!");
76 76
             }
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $value = '';
95 95
         foreach (explode(':', $ruleKey) as $configKey) {
96
-            $config = isset($config[ $configKey ]) ? $config[ $configKey ] : '';
96
+            $config = isset($config[$configKey]) ? $config[$configKey] : '';
97 97
         }
98 98
 
99 99
         if (is_array($config)) {
Please login to merge, or discard this patch.
src/Command/NewCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,8 @@
 block discarded – undo
15 15
     protected function configure()
16 16
     {
17 17
         $this->setName('new')
18
-             ->setDescription('Creates a new project directory, configuration and runs the install.')
19
-             ->addArgument('project-name', InputArgument::REQUIRED, 'The project name.');
18
+                ->setDescription('Creates a new project directory, configuration and runs the install.')
19
+                ->addArgument('project-name', InputArgument::REQUIRED, 'The project name.');
20 20
     }
21 21
 
22 22
     /**
Please login to merge, or discard this patch.
src/Command/InstallCommand.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 {
14 14
     protected function configure()
15 15
     {
16
-         $this->setName('install')
17
-              ->setDescription('Installs WordPress, required plugins, theme and dependencies');
16
+            $this->setName('install')
17
+                ->setDescription('Installs WordPress, required plugins, theme and dependencies');
18 18
     }
19 19
 
20 20
     protected function execute(InputInterface $input, OutputInterface $output)
Please login to merge, or discard this patch.
src/Lib/Download.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,6 +40,6 @@
 block discarded – undo
40 40
      */
41 41
     protected static function makeTempName($directory, $type)
42 42
     {
43
-        return $directory . '/' . md5(time().uniqid()) . ".{$type}";
43
+        return $directory . '/' . md5(time() . uniqid()) . ".{$type}";
44 44
     }
45 45
 }
Please login to merge, or discard this patch.