Completed
Pull Request — master (#158)
by Robbie
08:50
created
src/N98/Magento/Command/System/Cron/RunCommand.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      * @param InputInterface $input
98 98
      * @param OutputInterface $output
99 99
      * @param array $jobs
100
-     * @return mixed
100
+     * @return string
101 101
      * @throws \InvalidArgumentException
102 102
      * @throws \Exception
103 103
      */
Please login to merge, or discard this 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 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Symfony\Component\Console\Input\InputInterface;
7 7
 use Symfony\Component\Console\Input\InputOption;
8 8
 use Symfony\Component\Console\Output\OutputInterface;
9
-use Symfony\Component\Finder\Finder;
10 9
 use N98\Util\Console\Helper\Table\Renderer\RendererFactory;
11 10
 
12 11
 class InfoCommand extends AbstractMagentoCommand
Please login to merge, or discard this patch.
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -151,32 +151,32 @@
 block discarded – undo
151 151
     protected function addProductCount()
152 152
     {
153 153
         $this->infos['Product Count'] = $this->productFactory
154
-                                             ->create()
155
-                                             ->getCollection()
156
-                                             ->getSize();
154
+                                                ->create()
155
+                                                ->getCollection()
156
+                                                ->getSize();
157 157
     }
158 158
 
159 159
     protected function addCustomerCount()
160 160
     {
161 161
         $this->infos['Customer Count'] = $this->customerFactory->create()
162
-                                              ->getCollection()
163
-                                              ->getSize();
162
+                                                ->getCollection()
163
+                                                ->getSize();
164 164
     }
165 165
 
166 166
     protected function addCategoryCount()
167 167
     {
168 168
         $this->infos['Category Count'] = $this->categoryFactory
169
-                                              ->create()
170
-                                              ->getCollection()
171
-                                              ->getSize();
169
+                                                ->create()
170
+                                                ->getCollection()
171
+                                                ->getSize();
172 172
     }
173 173
 
174 174
     protected function addAttributeCount()
175 175
     {
176 176
         $this->infos['Attribute Count'] = $this->attributeFactory
177
-                                               ->create()
178
-                                               ->getCollection()
179
-                                               ->getSize();
177
+                                                ->create()
178
+                                                ->getCollection()
179
+                                                ->getSize();
180 180
     }
181 181
 
182 182
     protected function addCacheInfos()
Please login to merge, or discard this 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.
src/N98/Magento/Command/System/Setup/AbstractSetupCommand.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -3,11 +3,7 @@
 block discarded – undo
3 3
 namespace N98\Magento\Command\System\Setup;
4 4
 
5 5
 use N98\Magento\Command\AbstractMagentoCommand;
6
-use Symfony\Component\Console\Input\InputArgument;
7 6
 use Symfony\Component\Console\Input\InputInterface;
8
-use Symfony\Component\Console\Input\InputOption;
9
-use Symfony\Component\Console\Output\OutputInterface;
10
-use N98\Util\Console\Helper\Table\Renderer\RendererFactory;
11 7
 
12 8
 /**
13 9
  * Class AbstractSetupCommand
Please login to merge, or discard this patch.
src/N98/Magento/Command/System/Url/ListCommand.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     /**
64 64
      * @param \Magento\Store\Model\StoreManager $storeManager
65 65
      * @param \Magento\Sitemap\Model\ResourceModel\Catalog\Category $sitemapCategoryCollection
66
-     * @param \Magento\Sitemap\Model\ResourceModel\Catalog\Product $sitmapProductCollection
66
+     * @param \Magento\Sitemap\Model\ResourceModel\Catalog\Product $sitemapProductCollection
67 67
      * @param \Magento\Sitemap\Model\ResourceModel\Cms\Page $sitemapPageCollection
68 68
      */
69 69
     public function inject(
Please login to merge, or discard this 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/Framework/App/Magerun.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
      *
52 52
      * @param Bootstrap $bootstrap
53 53
      * @param \Exception $exception
54
-     * @return bool
54
+     * @return boolean|null
55 55
      */
56 56
     public function catchException(Bootstrap $bootstrap, \Exception $exception)
57 57
     {
Please login to merge, or discard this patch.
src/N98/Util/Console/Helper/DatabaseHelper.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use PDOException;
7 7
 use RuntimeException;
8 8
 use Symfony\Component\Console\Helper\Helper as AbstractHelper;
9
-use N98\Magento\Application;
10 9
 use Symfony\Component\Console\Output\NullOutput;
11 10
 use Symfony\Component\Console\Output\OutputInterface;
12 11
 
Please login to merge, or discard this patch.
src/N98/Util/Console/Helper/MagentoHelper.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace N98\Util\Console\Helper;
4 4
 
5 5
 use N98\Magento\Application;
6
-use N98\Util\BinaryString;
7 6
 use RuntimeException;
8 7
 use Symfony\Component\Console\Helper\Helper as AbstractHelper;
9 8
 use Symfony\Component\Console\Input\ArgvInput;
Please login to merge, or discard this patch.
src/N98/Util/Console/Helper/ParameterHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
      * @param OutputInterface                                $output
203 203
      * @param string                                         $name
204 204
      * @param string                                         $value
205
-     * @param Constraints\Collection|Constraint|Constraint[] $constraints The constraint(s) to validate against.
205
+     * @param Constraints\Collection $constraints The constraint(s) to validate against.
206 206
      *
207 207
      * @return mixed
208 208
      */
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 use Symfony\Component\Console\Helper\Helper as AbstractHelper;
10 10
 use Symfony\Component\Console\Output\OutputInterface;
11 11
 use Symfony\Component\Console\Input\InputInterface;
12
-use Symfony\Component\Console\Output\Output;
13 12
 use Symfony\Component\Translation\Translator;
14 13
 use Symfony\Component\Validator\Constraint;
15 14
 use Symfony\Component\Validator\Validator;
Please login to merge, or discard this patch.
src/N98/Util/Console/Helper/Table/Renderer/RendererInterface.php 1 patch
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -9,6 +9,7 @@
 block discarded – undo
9 9
     /**
10 10
      * @param OutputInterface $output
11 11
      * @param array $rows
12
+     * @return void
12 13
      */
13 14
     public function render(OutputInterface $output, array $rows);
14 15
 }
Please login to merge, or discard this patch.