Completed
Pull Request — develop (#167)
by Robbie
06:52 queued 02:20
created
src/N98/Magento/Command/Installer/SubCommand/InstallMagento.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             if (!preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url)) {
121 121
                 throw new \InvalidArgumentException('Please enter a valid URL');
122 122
             }
123
-            if (parse_url($url, \PHP_URL_HOST) ==  'localhost') {
123
+            if (parse_url($url, \PHP_URL_HOST) == 'localhost') {
124 124
                 throw new \InvalidArgumentException('localhost cause problems! Please use 127.0.0.1 or another hostname');
125 125
             }
126 126
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      */
212 212
     protected function getInstallScriptPath()
213 213
     {
214
-        $installerScript  = $this->config->getString('installationFolder') . DIRECTORY_SEPARATOR . 'bin/magento';
214
+        $installerScript = $this->config->getString('installationFolder') . DIRECTORY_SEPARATOR . 'bin/magento';
215 215
         if (!file_exists($installerScript)) {
216 216
             throw new \RuntimeException('Installation script was not found.', 1);
217 217
         }
Please login to merge, or discard this patch.
src/N98/Magento/Command/Installer/SubCommand/InstallSampleData.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $process = $processBuilder->getProcess();
51 51
         $process->setTimeout(86400);
52 52
         $process->start();
53
-        $process->wait(function ($type, $buffer) {
53
+        $process->wait(function($type, $buffer) {
54 54
             $this->output->write($buffer, false);
55 55
         });
56 56
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $process = $processBuilder->getProcess();
71 71
         $process->setTimeout(86400);
72 72
         $process->start();
73
-        $process->wait(function ($type, $buffer) {
73
+        $process->wait(function($type, $buffer) {
74 74
             $this->output->write($buffer, false);
75 75
         });
76 76
     }
Please login to merge, or discard this patch.
src/N98/Magento/Command/Installer/SubCommand/SelectMagentoVersion.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             } elseif ($this->input->getOption('magentoVersionByName')) {
43 43
                 foreach ($this->commandConfig['magento-packages'] as $key => $package) {
44 44
                     if ($package['name'] == $this->input->getOption('magentoVersionByName')) {
45
-                        $type = $key+1;
45
+                        $type = $key + 1;
46 46
                         break;
47 47
                     }
48 48
                 }
Please login to merge, or discard this patch.
src/N98/Magento/Command/ScriptCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
                 if (isset($parts[1])) {
172 172
                     $value = $parts[1];
173 173
                 }
174
-                $this->scriptVars['${' . $variable. '}'] = $value;
174
+                $this->scriptVars['${' . $variable . '}'] = $value;
175 175
             }
176 176
         }
177 177
     }
Please login to merge, or discard this patch.
src/N98/Magento/Command/SelfUpdateCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected function execute(InputInterface $input, OutputInterface $output)
47 47
     {
48 48
         $localFilename = realpath($_SERVER['argv'][0]) ?: $_SERVER['argv'][0];
49
-        $tempFilename = dirname($localFilename) . '/' . basename($localFilename, '.phar').'-temp.phar';
49
+        $tempFilename = dirname($localFilename) . '/' . basename($localFilename, '.phar') . '-temp.phar';
50 50
 
51 51
         // check for permissions in local filesystem before start connection process
52 52
         if (!is_writable($tempDirectory = dirname($tempFilename))) {
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 if (!$e instanceof \UnexpectedValueException && !$e instanceof \PharException) {
129 129
                     throw $e;
130 130
                 }
131
-                $output->writeln('<error>The download is corrupted ('.$e->getMessage().').</error>');
131
+                $output->writeln('<error>The download is corrupted (' . $e->getMessage() . ').</error>');
132 132
                 $output->writeln('<error>Please re-run the self-update command to try again.</error>');
133 133
             }
134 134
         } else {
Please login to merge, or discard this patch.
src/N98/Magento/Command/SubCommand/SubCommandFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         }
75 75
 
76 76
         $subCommand = new $className();
77
-        if (! $subCommand instanceof SubCommandInterface) {
77
+        if (!$subCommand instanceof SubCommandInterface) {
78 78
             throw new \InvalidArgumentException('Subcommand must implement SubCommandInterface.');
79 79
         }
80 80
 
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Cron/HistoryCommand.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@
 block discarded – undo
47 47
         }
48 48
 
49 49
         $timezone = $input->getOption('timezone')
50
-            ? $input->getOption('timezone') :
51
-            $this->_scopeConfig->getValue('general/locale/timezone');
50
+            ? $input->getOption('timezone') : $this->_scopeConfig->getValue('general/locale/timezone');
52 51
 
53 52
         if (!$input->getOption('format')) {
54 53
             $output->writeln('<info>Times shown in <comment>' . $timezone . '</comment></info>');
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Cron/RunCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         $jobConfig = $this->getJobConfig($jobCode);
50 50
 
51
-        if (empty($jobCode)|| !isset($jobConfig['instance'])) {
51
+        if (empty($jobCode) || !isset($jobConfig['instance'])) {
52 52
             throw new \InvalidArgumentException('No job config found!');
53 53
         }
54 54
 
@@ -104,14 +104,14 @@  discard block
 block discarded – undo
104 104
     protected function askJobCode(InputInterface $input, OutputInterface $output, $jobs)
105 105
     {
106 106
         foreach ($jobs as $key => $job) {
107
-            $question[] = '<comment>[' . ($key+1) . ']</comment> ' . $job['Job'] . PHP_EOL;
107
+            $question[] = '<comment>[' . ($key + 1) . ']</comment> ' . $job['Job'] . PHP_EOL;
108 108
         }
109 109
         $question[] = '<question>Please select job: </question>' . PHP_EOL;
110 110
 
111 111
         $jobCode = $this->getHelperSet()->get('dialog')->askAndValidate(
112 112
             $output,
113 113
             $question,
114
-            function ($typeInput) use ($jobs) {
114
+            function($typeInput) use ($jobs) {
115 115
                 if (!isset($jobs[$typeInput - 1])) {
116 116
                     throw new \InvalidArgumentException('Invalid job');
117 117
                 }
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/InfoCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
 
104 104
     public function hasInfo()
105 105
     {
106
-        return ! empty($this->infos);
106
+        return !empty($this->infos);
107 107
     }
108 108
 
109 109
     public function getInfo($key = null)
Please login to merge, or discard this patch.