Completed
Push — master ( dab058...c2113a )
by Ryo
44:39
created
src/Eccube/Controller/Admin/Setting/Shop/PaymentController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -93,10 +93,10 @@  discard block
 block discarded – undo
93 93
                 // ファイルアップロード
94 94
                 $file = $form['payment_image']->getData();
95 95
                 $fs = new Filesystem();
96
-                if ($file && $fs->exists($app['config']['image_temp_realdir'] . '/' . $file)) {
96
+                if ($file && $fs->exists($app['config']['image_temp_realdir'].'/'.$file)) {
97 97
                     $fs->rename(
98
-                        $app['config']['image_temp_realdir'] . '/' . $file,
99
-                        $app['config']['image_save_realdir'] . '/' . $file
98
+                        $app['config']['image_temp_realdir'].'/'.$file,
99
+                        $app['config']['image_save_realdir'].'/'.$file
100 100
                     );
101 101
                 }
102 102
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             }
145 145
 
146 146
             $extension = $image->guessExtension();
147
-            $filename = date('mdHis') . uniqid('_') . '.' . $extension;
147
+            $filename = date('mdHis').uniqid('_').'.'.$extension;
148 148
             $image->move($app['config']['image_temp_realdir'], $filename);
149 149
         }
150 150
         $event = new EventArgs(
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         foreach ($Payments as $Payment) {
181 181
             if ($Payment->getId() != $id) {
182 182
                 $Payment->setRank($rank);
183
-                $rank ++;
183
+                $rank++;
184 184
             }
185 185
         }
186 186
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         );
195 195
         $app['eccube.event.dispatcher']->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_PAYMENT_DELETE_COMPLETE, $event);
196 196
 
197
-        $app->addSuccess('admin.delete.complete', 'admin') ;
197
+        $app->addSuccess('admin.delete.complete', 'admin');
198 198
 
199 199
         return $app->redirect($app->url('admin_setting_shop_payment'));
200 200
     }
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Store/TemplateController.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 $config['template_realdir'] = $config['root_dir'].'/app/template/'.$templateCode;
78 78
                 $config['template_html_realdir'] = $config['public_path_realdir'].'/template/'.$templateCode;
79 79
                 $config['front_urlpath'] = $config['root_urlpath'].RELATIVE_PUBLIC_DIR_PATH.'/template/'.$templateCode;
80
-                $config['block_realdir'] =$config['template_realdir'].'/Block';
80
+                $config['block_realdir'] = $config['template_realdir'].'/Block';
81 81
 
82 82
                 if (file_exists($file.'.php')) {
83 83
                     file_put_contents($file.'.php', sprintf('<?php return %s', var_export($config, true)).';');
@@ -117,19 +117,19 @@  discard block
 block discarded – undo
117 117
         // 該当テンプレートのディレクトリ
118 118
         $config = $app['config'];
119 119
         $templateCode = $Template->getCode();
120
-        $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
121
-        $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
120
+        $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
121
+        $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
122 122
 
123 123
         // 一時ディレクトリ
124 124
         $uniqId = sha1(Str::random(32));
125
-        $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId;
126
-        $appDir = $tmpDir . '/app';
127
-        $htmlDir = $tmpDir . '/html';
125
+        $tmpDir = $config['template_temp_realdir'].'/'.$uniqId;
126
+        $appDir = $tmpDir.'/app';
127
+        $htmlDir = $tmpDir.'/html';
128 128
 
129 129
         // ファイル名
130
-        $tarFile = $config['template_temp_realdir'] . '/' . $uniqId . '.tar';
131
-        $tarGzFile = $tarFile . '.gz';
132
-        $downloadFileName = $Template->getCode() . '.tar.gz';
130
+        $tarFile = $config['template_temp_realdir'].'/'.$uniqId.'.tar';
131
+        $tarGzFile = $tarFile.'.gz';
132
+        $downloadFileName = $Template->getCode().'.tar.gz';
133 133
 
134 134
         // 該当テンプレートを一時ディレクトリへコピーする.
135 135
         $fs = new Filesystem();
@@ -149,14 +149,14 @@  discard block
 block discarded – undo
149 149
 
150 150
         // ダウンロード完了後にファイルを削除する.
151 151
         // http://stackoverflow.com/questions/15238897/removing-file-after-delivering-response-with-silex-symfony
152
-        $app->finish(function (Request $request, Response $response, \Silex\Application $app) use (
152
+        $app->finish(function(Request $request, Response $response, \Silex\Application $app) use (
153 153
             $tmpDir,
154 154
             $tarFile,
155 155
             $tarGzFile
156 156
         ) {
157
-            $app['monolog']->addDebug('remove temp file: ' . $tmpDir);
158
-            $app['monolog']->addDebug('remove temp file: ' . $tarFile);
159
-            $app['monolog']->addDebug('remove temp file: ' . $tarGzFile);
157
+            $app['monolog']->addDebug('remove temp file: '.$tmpDir);
158
+            $app['monolog']->addDebug('remove temp file: '.$tarFile);
159
+            $app['monolog']->addDebug('remove temp file: '.$tarGzFile);
160 160
             $fs = new Filesystem();
161 161
             $fs->remove($tmpDir);
162 162
             $fs->remove($tarFile);
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
         // テンプレートディレクトリの削除
198 198
         $config = $app['config'];
199 199
         $templateCode = $Template->getCode();
200
-        $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
201
-        $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
200
+        $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
201
+        $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
202 202
 
203 203
         $fs = new Filesystem();
204 204
         $fs->remove($targetRealDir);
@@ -241,18 +241,18 @@  discard block
 block discarded – undo
241 241
                 // 該当テンプレートのディレクトリ
242 242
                 $config = $app['config'];
243 243
                 $templateCode = $Template->getCode();
244
-                $targetRealDir = $config['root_dir'] . '/app/template/' . $templateCode;
245
-                $targetHtmlRealDir = $config['root_dir'] . '/html/template/' . $templateCode;
244
+                $targetRealDir = $config['root_dir'].'/app/template/'.$templateCode;
245
+                $targetHtmlRealDir = $config['root_dir'].'/html/template/'.$templateCode;
246 246
 
247 247
                 // 一時ディレクトリ
248 248
                 $uniqId = sha1(Str::random(32));
249
-                $tmpDir = $config['template_temp_realdir'] . '/' . $uniqId;
250
-                $appDir = $tmpDir . '/app';
251
-                $htmlDir = $tmpDir . '/html';
249
+                $tmpDir = $config['template_temp_realdir'].'/'.$uniqId;
250
+                $appDir = $tmpDir.'/app';
251
+                $htmlDir = $tmpDir.'/html';
252 252
 
253 253
                 $formFile = $form['file']->getData();
254 254
                 // ファイル名
255
-                $archive = $templateCode . '.' . $formFile->getClientOriginalExtension();
255
+                $archive = $templateCode.'.'.$formFile->getClientOriginalExtension();
256 256
 
257 257
                 // ファイルを一時ディレクトリへ移動.
258 258
                 $formFile->move($tmpDir, $archive);
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
                 try {
262 262
                     if ($formFile->getClientOriginalExtension() == 'zip') {
263 263
                         $zip = new \ZipArchive();
264
-                        $zip->open($tmpDir . '/' . $archive);
264
+                        $zip->open($tmpDir.'/'.$archive);
265 265
                         $zip->extractTo($tmpDir);
266 266
                         $zip->close();
267 267
                     } else {
268
-                        $phar = new \PharData($tmpDir . '/' . $archive);
268
+                        $phar = new \PharData($tmpDir.'/'.$archive);
269 269
                         $phar->extractTo($tmpDir, null, true);
270 270
                     }
271 271
                 } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/CategoryController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         $em->getConfiguration()->setSQLLogger(null);
206 206
 
207 207
         $response = new StreamedResponse();
208
-        $response->setCallback(function () use ($app, $request) {
208
+        $response->setCallback(function() use ($app, $request) {
209 209
 
210 210
             // CSV種別を元に初期化.
211 211
             $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CATEGORY);
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 
220 220
             // データ行の出力.
221 221
             $app['eccube.service.csv.export']->setExportQueryBuilder($qb);
222
-            $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) {
222
+            $app['eccube.service.csv.export']->exportData(function($entity, $csvService) {
223 223
 
224 224
                 $Csvs = $csvService->getCsvs();
225 225
 
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
         });
240 240
 
241 241
         $now = new \DateTime();
242
-        $filename = 'category_' . $now->format('YmdHis') . '.csv';
242
+        $filename = 'category_'.$now->format('YmdHis').'.csv';
243 243
         $response->headers->set('Content-Type', 'application/octet-stream');
244
-        $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename);
244
+        $response->headers->set('Content-Disposition', 'attachment; filename='.$filename);
245 245
         $response->send();
246 246
 
247 247
         log_info('カテゴリCSV出力ファイル名', array($filename));
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/BlockController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 // ファイル生成・更新
115 115
                 $tplDir = $app['config']['block_realdir'];
116 116
 
117
-                $filePath = $tplDir . '/' . $Block->getFileName() . '.twig';
117
+                $filePath = $tplDir.'/'.$Block->getFileName().'.twig';
118 118
 
119 119
                 $fs = new Filesystem();
120 120
                 $blockData = $form->get('block_html')->getData();
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 $fs->dumpFile($filePath, $blockData);
123 123
                 // 更新でファイル名を変更した場合、以前のファイルを削除
124 124
                 if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) {
125
-                    $oldFilePath = $tplDir . '/' . $previous_filename . '.twig';
125
+                    $oldFilePath = $tplDir.'/'.$previous_filename.'.twig';
126 126
                     if ($fs->exists($oldFilePath)) {
127 127
                         $fs->remove($oldFilePath);
128 128
                     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
         // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る
176 176
         if ($Block->getDeletableFlg() > 0) {
177 177
             $tplDir = $app['config']['block_realdir'];
178
-            $file = $tplDir . '/' . $Block->getFileName() . '.twig';
178
+            $file = $tplDir.'/'.$Block->getFileName().'.twig';
179 179
             $fs = new Filesystem();
180 180
             if ($fs->exists($file)) {
181 181
                 $fs->remove($file);
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/FileController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     private $error = null;
40 40
     private $encode = '';
41 41
 
42
-    public function __construct(){
42
+    public function __construct() {
43 43
         $this->encode = self::UTF;
44 44
         if ('\\' === DIRECTORY_SEPARATOR) {
45 45
             $this->encode = self::SJIS;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $arrFileList = $this->getFileList($app, $nowDir);
85 85
 
86 86
         $javascript = $this->getJsArrayList($tree);
87
-        $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');";
87
+        $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');";
88 88
 
89 89
         return $app->render('Content/file.twig', array(
90 90
             'form' => $form->createView(),
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
                 $nowDir = $this->checkDir($request->get('now_dir'), $topDir)
142 142
                     ? $this->normalizePath($request->get('now_dir'))
143 143
                     : $topDir;
144
-                $fs->mkdir($nowDir . '/' . $filename);
144
+                $fs->mkdir($nowDir.'/'.$filename);
145 145
             }
146 146
         }
147 147
     }
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
     {
220 220
         $str = "arrTree = new Array();\n";
221 221
         foreach ($tree as $key => $val) {
222
-            $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['rank'] . ',';
222
+            $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['rank'].',';
223 223
             if ($val['open']) {
224 224
                 $str .= "true);\n";
225 225
             } else {
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
     private function getFileList($app, $nowDir)
271 271
     {
272 272
         $topDir = $app['config']['user_data_realdir'];
273
-        $filter = function (\SplFileInfo $file) use ($topDir) {
273
+        $filter = function(\SplFileInfo $file) use ($topDir) {
274 274
             $acceptPath = realpath($topDir);
275 275
             $targetPath = $file->getRealPath();
276 276
             return (strpos($targetPath, $acceptPath) === 0);
Please login to merge, or discard this patch.
src/Eccube/Controller/Mypage/DeliveryController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         // 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する
84 84
         if (!in_array($parentPage, $allowdParents)) {
85 85
             // @deprecated 使用されていないコード
86
-            $parentPage  = $app->url('mypage_delivery');
86
+            $parentPage = $app->url('mypage_delivery');
87 87
         }
88 88
 
89 89
         $builder = $app['form.factory']
Please login to merge, or discard this patch.
src/Eccube/Controller/UserDataController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $paths[] = $app['config']['user_data_realdir'];
56 56
         $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
57 57
 
58
-        $file = $PageLayout->getFileName() . '.twig';
58
+        $file = $PageLayout->getFileName().'.twig';
59 59
 
60 60
         $event = new EventArgs(
61 61
             array(
Please login to merge, or discard this patch.
src/Eccube/Controller/AbstractController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED);
46 46
 
47 47
         $form = $app['form.factory']
48
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
48
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
49 49
             ->getForm();
50 50
         $form->handleRequest($app['request']);
51 51
 
Please login to merge, or discard this patch.
src/Eccube/Controller/ForgotController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
                 // リセットキーの発行・有効期限の設定
65 65
                 $Customer
66 66
                     ->setResetKey($app['eccube.repository.customer']->getUniqueResetKey($app))
67
-                    ->setResetExpire(new \DateTime('+' . $app['config']['customer_reset_expire'] .' min'));
67
+                    ->setResetExpire(new \DateTime('+'.$app['config']['customer_reset_expire'].' min'));
68 68
 
69 69
                 // リセットキーを更新
70 70
                 $app['orm.em']->persist($Customer);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
                 // ログ出力
89 89
                 $app['monolog']->addInfo(
90
-                    'send reset password mail to:'  . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
90
+                    'send reset password mail to:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
91 91
                 );
92 92
             } else {
93 93
                 log_warning('Un active customer try send reset password email: ', array('Enter email' => $form->get('login_email')->getData()));
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             // ログ出力
171 171
             $app['monolog']->addInfo(
172
-                'reset password complete:' . "{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
172
+                'reset password complete:'."{$Customer->getId()} {$Customer->getEmail()} {$request->getClientIp()}"
173 173
             );
174 174
         } else {
175 175
             throw new HttpException\AccessDeniedHttpException('不正なアクセスです。');
Please login to merge, or discard this patch.