Completed
Pull Request — experimental/3.1 (#2674)
by
unknown
29:06 queued 02:39
created
src/Eccube/Controller/Admin/Setting/System/MasterdataController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
                 $entity = new $entityName();
173 173
                 $sortNo = 0;
174 174
                 $ids = array_map(
175
-                    function ($v) {
175
+                    function($v) {
176 176
                         return $v['id'];
177 177
                     },
178 178
                     $data['data']
Please login to merge, or discard this patch.
src/Eccube/Command/CacheClearCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
         $this->app = $this->getSilexApplication();
54 54
         
55
-        \Eccube\Util\CacheUtil::clear($this->app,$input->getOption('all'));
55
+        \Eccube\Util\CacheUtil::clear($this->app, $input->getOption('all'));
56 56
         $output->writeln(sprintf("%s <info>success</info>", 'cache:clear'));
57 57
 
58 58
     }
Please login to merge, or discard this patch.
src/Eccube/Doctrine/ORM/Mapping/Driver/ReloadSafeAnnotationDriver.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         }
73 73
 
74 74
         foreach ($this->paths as $path) {
75
-            if ( ! is_dir($path)) {
75
+            if (!is_dir($path)) {
76 76
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
77 77
             }
78 78
 
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
                     new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS),
82 82
                     \RecursiveIteratorIterator::LEAVES_ONLY
83 83
                 ),
84
-                '/^.+' . preg_quote($this->fileExtension) . '$/i',
84
+                '/^.+'.preg_quote($this->fileExtension).'$/i',
85 85
                 \RecursiveRegexIterator::GET_MATCH
86 86
             );
87 87
 
88 88
             foreach ($iterator as $file) {
89 89
                 $sourceFile = $file[0];
90 90
 
91
-                if ( ! preg_match('(^phar:)i', $sourceFile)) {
91
+                if (!preg_match('(^phar:)i', $sourceFile)) {
92 92
                     $sourceFile = realpath($sourceFile);
93 93
                 }
94 94
 
@@ -133,15 +133,15 @@  discard block
 block discarded – undo
133 133
                     $namespaceEndIndex = $tokens->getNextTokenOfKind($namespaceIndex, [';']);
134 134
                     $namespace = $tokens->generatePartialCode($tokens->getNextMeaningfulToken($namespaceIndex), $tokens->getPrevMeaningfulToken($namespaceEndIndex));
135 135
                     $className = $tokens[$classNameTokenIndex]->getContent();
136
-                    $fqcn = $namespace . '\\' . $className;
137
-                    if (class_exists($fqcn) && ! $this->isTransient($fqcn)) {
136
+                    $fqcn = $namespace.'\\'.$className;
137
+                    if (class_exists($fqcn) && !$this->isTransient($fqcn)) {
138 138
                         if (in_array($sourceFile, $this->newProxyFiles)) {
139
-                            $newClassName = $className . StringUtil::random(12);
139
+                            $newClassName = $className.StringUtil::random(12);
140 140
                             $tokens[$classNameTokenIndex] = new Token([T_STRING, $newClassName]);
141 141
                             $newFilePath = $this->outputDir."${newClassName}.php";
142 142
                             file_put_contents($newFilePath, $tokens->generateCode());
143 143
                             require_once $newFilePath;
144
-                            $results[] = $namespace . "\\${newClassName}";
144
+                            $results[] = $namespace."\\${newClassName}";
145 145
                         } else {
146 146
                             $results[] = $fqcn;
147 147
                         }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/SecurityController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                     } else {
94 94
                         // httpから変更されたらfalseのまま
95 95
                         $config['force_ssl'] = Constant::DISABLED;
96
-                        $data['force_ssl'] = (bool)Constant::DISABLED;
96
+                        $data['force_ssl'] = (bool) Constant::DISABLED;
97 97
                     }
98 98
                 } else {
99 99
                     $config['force_ssl'] = Constant::DISABLED;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
             if (count($allowHost) > 0) {
139 139
                 $form->get('admin_allow_hosts')->setData(StringUtil::convertLineFeed(implode("\n", $allowHost)));
140 140
             }
141
-            $form->get('force_ssl')->setData((bool)$this->appConfig['force_ssl']);
141
+            $form->get('force_ssl')->setData((bool) $this->appConfig['force_ssl']);
142 142
         }
143 143
 
144 144
         return [
Please login to merge, or discard this patch.
src/Eccube/Service/SchemaService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
     public function updateSchema($generatedFiles, $proxiesDirectory)
46 46
     {
47
-        $outputDir = sys_get_temp_dir() . '/proxy_' . StringUtil::random(12);
47
+        $outputDir = sys_get_temp_dir().'/proxy_'.StringUtil::random(12);
48 48
         mkdir($outputDir);
49 49
 
50 50
         try {
Please login to merge, or discard this patch.
src/Eccube/Service/PluginService.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         // Proxyのクラスをロードせずにスキーマを更新するために、
183 183
         // インストール時には一時的なディレクトリにProxyを生成する
184
-        $tmpProxyOutputDir = sys_get_temp_dir() . '/proxy_' . StringUtil::random(12);
184
+        $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.StringUtil::random(12);
185 185
         @mkdir($tmpProxyOutputDir);
186 186
 
187 187
         try {
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
             if (!empty($config_cache)) {
248 248
                 $meta = $config_cache;
249 249
             } else {
250
-                $meta = $this->readYml($dir . '/config.yml');
250
+                $meta = $this->readYml($dir.'/config.yml');
251 251
             }
252 252
         } catch (\Symfony\Component\Yaml\Exception\ParseException $e) {
253 253
             throw new PluginException($e->getMessage(), $e->getCode(), $e);
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
     {
857 857
         $result = array_keys($packages);
858 858
         if ($getVersion) {
859
-            $result = array_map(function ($package, $version) {
859
+            $result = array_map(function($package, $version) {
860 860
                 return $package.':'.$version;
861 861
             }, array_keys($packages), array_values($packages));
862 862
         }
Please login to merge, or discard this patch.
Doc Comments   +23 added lines, -3 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      *
116 116
      * @param string $path   path to tar.gz/zip plugin file
117 117
      * @param int    $source
118
-     * @return mixed
118
+     * @return boolean
119 119
      * @throws PluginException
120 120
      * @throws \Exception
121 121
      */
@@ -180,6 +180,10 @@  discard block
 block discarded – undo
180 180
     }
181 181
 
182 182
     // インストール事後処理
183
+
184
+    /**
185
+     * @param integer $source
186
+     */
183 187
     public function postInstall($config, $event, $source)
184 188
     {
185 189
         // Proxyのクラスをロードせずにスキーマを更新するために、
@@ -226,6 +230,10 @@  discard block
 block discarded – undo
226 230
         }
227 231
     }
228 232
 
233
+    /**
234
+     * @param string $archive
235
+     * @param string $dir
236
+     */
229 237
     public function unpackPluginArchive($archive, $dir)
230 238
     {
231 239
         $extension = pathinfo($archive, PATHINFO_EXTENSION);
@@ -285,6 +293,9 @@  discard block
 block discarded – undo
285 293
         }
286 294
     }
287 295
 
296
+    /**
297
+     * @param string $yml
298
+     */
288 299
     public function readYml($yml)
289 300
     {
290 301
         if (file_exists($yml)) {
@@ -302,6 +313,9 @@  discard block
 block discarded – undo
302 313
         // ディレクトリ名などに使われれるので厳しめ
303 314
     }
304 315
 
316
+    /**
317
+     * @param string $path
318
+     */
305 319
     public function deleteFile($path)
306 320
     {
307 321
         $f = new Filesystem();
@@ -321,6 +335,9 @@  discard block
 block discarded – undo
321 335
         return $this->appConfig['plugin_realdir'].'/'.$name;
322 336
     }
323 337
 
338
+    /**
339
+     * @param string $d
340
+     */
324 341
     public function createPluginDir($d)
325 342
     {
326 343
         $b = @mkdir($d);
@@ -378,6 +395,9 @@  discard block
 block discarded – undo
378 395
         return $p;
379 396
     }
380 397
 
398
+    /**
399
+     * @param string $method
400
+     */
381 401
     public function callPluginManagerMethod($meta, $method)
382 402
     {
383 403
         $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager';
@@ -888,7 +908,7 @@  discard block
 block discarded – undo
888 908
      * [プラグインコード]/Resource/assets
889 909
      * 配下に置かれているファイルが所定の位置へコピーされる
890 910
      *
891
-     * @param $pluginBaseDir
911
+     * @param string $pluginBaseDir
892 912
      * @param $pluginCode
893 913
      */
894 914
     public function copyAssets($pluginBaseDir, $pluginCode)
@@ -923,7 +943,7 @@  discard block
 block discarded – undo
923 943
      *
924 944
      * @param string $pluginVersion
925 945
      * @param string $remoteVersion
926
-     * @return mixed
946
+     * @return boolean
927 947
      */
928 948
     public function isUpdate($pluginVersion, $remoteVersion)
929 949
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 use Eccube\Entity\Plugin;
34 34
 use Eccube\Entity\PluginEventHandler;
35 35
 use Eccube\Exception\PluginException;
36
-use Eccube\Plugin\ConfigManager;
37 36
 use Eccube\Plugin\ConfigManager as PluginConfigManager;
38 37
 use Eccube\Repository\PluginEventHandlerRepository;
39 38
 use Eccube\Repository\PluginRepository;
Please login to merge, or discard this patch.
src/Eccube/Util/StringUtil.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return $value;
160 160
         }
161 161
 
162
-        return rtrim(mb_substr($value, 0, $length, 'UTF-8')) . $end;
162
+        return rtrim(mb_substr($value, 0, $length, 'UTF-8')).$end;
163 163
     }
164 164
 
165 165
 
@@ -186,18 +186,18 @@  discard block
 block discarded – undo
186 186
         }
187 187
         if ($diff->m == 1 || $diff->days > 0) {
188 188
             if ($diff->days <= 31) {
189
-                return $diff->days . '日前';
189
+                return $diff->days.'日前';
190 190
             }
191 191
             // return $date->format("Y/m/d H:i");
192 192
             return $date->format("Y/m/d");
193 193
         }
194 194
         if ($diff->h > 0) {
195
-            return $diff->h . "時間前";
195
+            return $diff->h."時間前";
196 196
         }
197 197
         if ($diff->i > 0) {
198
-            return $diff->i . "分前";
198
+            return $diff->i."分前";
199 199
         }
200
-        return $diff->s . "秒前";
200
+        return $diff->s."秒前";
201 201
     }
202 202
 
203 203
     /**
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Shopping/OrderType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         // 支払い方法のプルダウンを生成
111 111
         $builder->addEventListener(
112 112
             FormEvents::PRE_SET_DATA,
113
-            function (FormEvent $event) {
113
+            function(FormEvent $event) {
114 114
                 /** @var Order $Order */
115 115
                 $Order = $event->getData();
116 116
                 if (is_null($Order) || !$Order->getId()) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         // TODO Calculatorで行うのが適切.
159 159
         $builder->addEventListener(
160 160
             FormEvents::POST_SUBMIT,
161
-            function (FormEvent $event) {
161
+            function(FormEvent $event) {
162 162
                 /** @var Order $Order */
163 163
                 $Order = $event->getData();
164 164
                 // XXX 非会員購入の際, use_point が null で submit される?
Please login to merge, or discard this patch.
src/Eccube/DI/DIServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 {
13 13
     public function register(Container $app)
14 14
     {
15
-        $app['eccube.di'] = function (Container $app) {
15
+        $app['eccube.di'] = function(Container $app) {
16 16
             $di = new DependencyBuilder(
17 17
                 $app['eccube.di.generator.dir'],
18 18
                 $app['eccube.di.generator.class'],
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
         // XXX これを入れないと EntityEventDispatcher が有効になった時テストがコケる
39 39
         if (!$app->offsetExists('eccube.event.dispatcher')) {
40
-            $app['eccube.event.dispatcher'] = function () use ($app) {
40
+            $app['eccube.event.dispatcher'] = function() use ($app) {
41 41
                 return $app['dispatcher'];
42 42
             };
43 43
         }
Please login to merge, or discard this patch.