Completed
Branch master (383d0c)
by Tom
04:14
created
src/bootstrap.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
16 16
          */
17 17
         public static function getLoader()
18 18
         {
19
-            if ((!$loader = \N98_Magerun_Bootstrap::includeIfExists(__DIR__.'/../vendor/autoload.php'))
20
-                && (!$loader = \N98_Magerun_Bootstrap::includeIfExists(__DIR__.'/../../../autoload.php'))) {
21
-                throw new \ErrorException('You must set up the project dependencies, run the following commands:'.PHP_EOL.
22
-                    'curl -s http://getcomposer.org/installer | php'.PHP_EOL.
23
-                    'php composer.phar install'.PHP_EOL);
19
+            if ((!$loader = \N98_Magerun_Bootstrap::includeIfExists(__DIR__ . '/../vendor/autoload.php'))
20
+                && (!$loader = \N98_Magerun_Bootstrap::includeIfExists(__DIR__ . '/../../../autoload.php'))) {
21
+                throw new \ErrorException('You must set up the project dependencies, run the following commands:' . PHP_EOL .
22
+                    'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
23
+                    'php composer.phar install' . PHP_EOL);
24 24
             }
25 25
 
26 26
             return $loader;
Please login to merge, or discard this patch.
src/N98/Magento/Command/GiftCard/CreateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
                 'status'        => 1,
50 50
                 'is_redeemable' => 1,
51 51
                 'website_id'    => $input->getOption('website')
52
-                    ? : $this->getObjectManager()->get('Magento\Store\Model\StoreManager')->getWebsite(true)->getId(),
52
+                    ?: $this->getObjectManager()->get('Magento\Store\Model\StoreManager')->getWebsite(true)->getId(),
53 53
                 'balance'       => $input->getArgument('amount'),
54 54
                 'date_expires'  => $input->getOption('expires')
55 55
             )
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/System/Url/ListCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     {
76 76
         $this->storeManager = $storeManager;
77 77
         $this->sitemapCategoryCollection = $sitemapCategoryCollection;
78
-        $this->sitemapProductCollection= $sitemapProductCollection;
78
+        $this->sitemapProductCollection = $sitemapProductCollection;
79 79
         $this->sitemapPageCollection = $sitemapPageCollection;
80 80
     }
81 81
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
                 try {
101 101
                     $currentStore = $this->storeManager->getStore($storeId);
102
-                } catch(\Exception $e) {
102
+                } catch (\Exception $e) {
103 103
                     throw new \RuntimeException("Store with id {$storeId} doesn´t exist");
104 104
                 }
105 105
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
                     $parts = parse_url($url);
151 151
                     foreach ($parts as $key => $value) {
152
-                        $line = str_replace('{'.$key.'}', $value, $line);
152
+                        $line = str_replace('{' . $key . '}', $value, $line);
153 153
                     }
154 154
 
155 155
                     // ... and output
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Setup/CompareVersionsCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     protected function execute(InputInterface $input, OutputInterface $output)
60 60
     {
61 61
         $time = microtime(true);
62
-        $ignoreDataUpdate   = $input->getOption('ignore-data');
62
+        $ignoreDataUpdate = $input->getOption('ignore-data');
63 63
 
64 64
         $headers = array('Setup', 'Module', 'DB', 'Data', 'Status');
65 65
         if ($ignoreDataUpdate) {
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 return $a['Status'] !== 'OK';
107 107
             });
108 108
 
109
-            array_walk($table, function (&$row) {
109
+            array_walk($table, function(&$row) {
110 110
                 $status             = $row['Status'];
111 111
                 $availableStatus    = array('OK' => 'info', 'Error' => 'error');
112 112
                 $statusString       = sprintf(
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/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/InfoCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 
106 106
     public function hasInfo()
107 107
     {
108
-        return ! empty($this->infos);
108
+        return !empty($this->infos);
109 109
     }
110 110
 
111 111
     public function getInfo($key = null)
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/MaintenanceCommand.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
                         ->get('\Magento\Framework\Filesystem')
44 44
                         ->getDirectoryWrite(MaintenanceMode::FLAG_DIR);
45 45
 
46
-        if (! is_null($input->getOption('off'))) {
47
-            if (! $flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) {
46
+        if (!is_null($input->getOption('off'))) {
47
+            if (!$flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) {
48 48
                 return $output->writeln(self::ALREADY_DISABLED_MESSAGE);
49 49
             }
50 50
 
51 51
             return $this->handleDisable($flagDir, $output, $input->getOption('off'));
52 52
         }
53 53
 
54
-        if (! is_null($input->getOption('on'))) {
54
+        if (!is_null($input->getOption('on'))) {
55 55
             if ($flagDir->isExist(MaintenanceMode::FLAG_FILENAME)) {
56 56
                 return $output->writeln(self::ALREADY_ENABLED_MESSAGE);
57 57
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     protected function handleDisable(
76 76
         \Magento\Framework\Filesystem\Directory\Write $flagDir,
77 77
         OutputInterface $output,
78
-        $offOption= null
78
+        $offOption = null
79 79
     ) {
80 80
         $flagDir->delete(MaintenanceMode::FLAG_FILENAME);
81 81
         $output->writeln(self::DISABLED_MESSAGE);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         $flagDir->touch(MaintenanceMode::FLAG_FILENAME);
101 101
         $output->writeln(self::ENABLED_MESSAGE);
102 102
 
103
-        if (! is_null($onOption)) {
103
+        if (!is_null($onOption)) {
104 104
             // Write IPs to exclusion file
105 105
             $flagDir->writeFile(MaintenanceMode::IP_FILENAME, $onOption);
106 106
             $output->writeln(self::WROTE_IP_MESSAGE);
Please login to merge, or discard this patch.