@@ -25,7 +25,7 @@ |
||
25 | 25 | require __DIR__.'/../autoload.php'; |
26 | 26 | |
27 | 27 | ini_set('display_errors', 'Off'); |
28 | -error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT); |
|
28 | +error_reporting(E_ALL&~E_DEPRECATED&~E_STRICT); |
|
29 | 29 | |
30 | 30 | $app = new Eccube\Application(); |
31 | 31 |
@@ -58,7 +58,7 @@ |
||
58 | 58 | |
59 | 59 | // load config dev |
60 | 60 | $conf = $app['config']; |
61 | -$app['config'] = $app->share(function () use ($conf) { |
|
61 | +$app['config'] = $app->share(function() use ($conf) { |
|
62 | 62 | $confarray = array(); |
63 | 63 | $config_dev_file = __DIR__.'/../app/config/eccube/config_dev.yml'; |
64 | 64 | if (file_exists($config_dev_file)) { |
@@ -26,11 +26,11 @@ |
||
26 | 26 | apc_clear_cache(); |
27 | 27 | } |
28 | 28 | |
29 | -require __DIR__ . '/../autoload.php'; |
|
29 | +require __DIR__.'/../autoload.php'; |
|
30 | 30 | |
31 | 31 | $app = new Eccube\InstallApplication(); |
32 | 32 | $app['debug'] = true; |
33 | -$app->before(function (\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
33 | +$app->before(function(\Symfony\Component\HttpFoundation\Request $request, \Silex\Application $app) { |
|
34 | 34 | if (!$request->getSession()->isStarted()) { |
35 | 35 | $request->getSession()->start(); |
36 | 36 | } |
@@ -19,32 +19,32 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function addSuccess($message, $namespace = 'front') |
21 | 21 | { |
22 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message); |
|
22 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function addError($message, $namespace = 'front') |
26 | 26 | { |
27 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message); |
|
27 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function addDanger($message, $namespace = 'front') |
31 | 31 | { |
32 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message); |
|
32 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function addWarning($message, $namespace = 'front') |
36 | 36 | { |
37 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message); |
|
37 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function addInfo($message, $namespace = 'front') |
41 | 41 | { |
42 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message); |
|
42 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function addRequestError($message, $namespace = 'front') |
46 | 46 | { |
47 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message); |
|
47 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function clearMessage() |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | $twig = $this['twig']; |
211 | 211 | |
212 | 212 | if ($response instanceof StreamedResponse) { |
213 | - $response->setCallback(function () use ($twig, $view, $parameters) { |
|
213 | + $response->setCallback(function() use ($twig, $view, $parameters) { |
|
214 | 214 | $twig->display($view, $parameters); |
215 | 215 | }); |
216 | 216 | } else { |
@@ -55,7 +55,7 @@ |
||
55 | 55 | |
56 | 56 | protected function execute(InputInterface $input, OutputInterface $output) { |
57 | 57 | |
58 | - \Eccube\Util\Cache::clear($this->app,$input->getOption('all')); |
|
58 | + \Eccube\Util\Cache::clear($this->app, $input->getOption('all')); |
|
59 | 59 | $output->writeln(sprintf("%s <info>success</info>", 'cache:clear')); |
60 | 60 | |
61 | 61 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | protected function getBoundForm(Application $app, $type) |
39 | 39 | { |
40 | 40 | $form = $app['form.factory'] |
41 | - ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type]) |
|
41 | + ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type]) |
|
42 | 42 | ->getForm(); |
43 | 43 | $form->handleRequest($app['request']); |
44 | 44 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | // install.phpのチェック. |
57 | 57 | if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) { |
58 | - $file = $app['config']['root_dir'] . '/html/install.php'; |
|
58 | + $file = $app['config']['root_dir'].'/html/install.php'; |
|
59 | 59 | if (file_exists($file)) { |
60 | 60 | $app->addWarning('admin.install.warning', 'admin'); |
61 | 61 | } |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | t1.status |
185 | 185 | ORDER BY |
186 | 186 | t1.status'; |
187 | - $rsm = new ResultSetMapping();; |
|
187 | + $rsm = new ResultSetMapping(); ; |
|
188 | 188 | $rsm->addScalarResult('status', 'status'); |
189 | 189 | $rsm->addScalarResult('count', 'count'); |
190 | 190 | $query = $em->createNativeQuery($sql, $rsm); |
@@ -88,19 +88,19 @@ discard block |
||
88 | 88 | // ファイル生成・更新 |
89 | 89 | $tplDir = $app['config']['block_realdir']; |
90 | 90 | |
91 | - $filePath = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
91 | + $filePath = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
92 | 92 | |
93 | 93 | $fs = new Filesystem(); |
94 | 94 | $fs->dumpFile($filePath, $form->get('block_html')->getData()); |
95 | 95 | // 更新でファイル名を変更した場合、以前のファイルを削除 |
96 | 96 | if ($Block->getFileName() != $previous_filename && !is_null($previous_filename)) { |
97 | - $oldFilePath = $tplDir . $previous_filename; |
|
97 | + $oldFilePath = $tplDir.$previous_filename; |
|
98 | 98 | if ($fs->exists($oldFilePath)) { |
99 | 99 | $fs->remove($oldFilePath); |
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
103 | - \Eccube\Util\Cache::clear($app,false); |
|
103 | + \Eccube\Util\Cache::clear($app, false); |
|
104 | 104 | |
105 | 105 | $app->addSuccess('admin.register.complete', 'admin'); |
106 | 106 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | // テンプレートが変更されていた場合、DBからはブロック削除されるがtwigファイルは残る |
138 | 138 | if ($Block->getDeletableFlg() > 0) { |
139 | 139 | $tplDir = $app['config']['block_realdir']; |
140 | - $file = $tplDir . '/' . $Block->getFileName() . '.twig'; |
|
140 | + $file = $tplDir.'/'.$Block->getFileName().'.twig'; |
|
141 | 141 | $fs = new Filesystem(); |
142 | 142 | if ($fs->exists($file)) { |
143 | 143 | $fs->remove($file); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | $app['orm.em']->flush(); |
147 | 147 | |
148 | 148 | $app->addSuccess('admin.delete.complete', 'admin'); |
149 | - \Eccube\Util\Cache::clear($app,false); |
|
149 | + \Eccube\Util\Cache::clear($app, false); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 |
@@ -39,7 +39,7 @@ discard block |
||
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; |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $arrFileList = $this->getFileList($app, $nowDir); |
83 | 83 | |
84 | 84 | $javascript = $this->getJsArrayList($tree); |
85 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
85 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
86 | 86 | |
87 | 87 | return $app->render('Content/file.twig', array( |
88 | 88 | 'form' => $form->createView(), |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
140 | 140 | ? $this->normalizePath($request->get('now_dir')) |
141 | 141 | : $topDir; |
142 | - $fs->mkdir($nowDir . '/' . $filename); |
|
142 | + $fs->mkdir($nowDir.'/'.$filename); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
@@ -219,7 +219,7 @@ discard block |
||
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 |
||
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); |