@@ -137,7 +137,7 @@ |
||
137 | 137 | * 仮受注情報作成 |
138 | 138 | * |
139 | 139 | * @param $Customer |
140 | - * @param $preOrderId |
|
140 | + * @param string $preOrderId |
|
141 | 141 | * @return mixed |
142 | 142 | * @throws \Doctrine\ORM\NoResultException |
143 | 143 | * @throws \Doctrine\ORM\NonUniqueResultException |
@@ -920,7 +920,7 @@ |
||
920 | 920 | |
921 | 921 | // 配送日数が設定されている |
922 | 922 | if ($deliveryDateFlag) { |
923 | - $period = new \DatePeriod ( |
|
923 | + $period = new \DatePeriod( |
|
924 | 924 | new \DateTime($minDate.' day'), |
925 | 925 | new \DateInterval('P1D'), |
926 | 926 | new \DateTime($minDate + $this->app['config']['deliv_date_end_max'].' day') |
@@ -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 | } |
@@ -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); |
@@ -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); |
@@ -230,6 +230,10 @@ discard block |
||
230 | 230 | return $str; |
231 | 231 | } |
232 | 232 | |
233 | + /** |
|
234 | + * @param string $topDir |
|
235 | + * @param Request $request |
|
236 | + */ |
|
233 | 237 | private function getTree($topDir, $request) |
234 | 238 | { |
235 | 239 | $finder = Finder::create()->in($topDir) |
@@ -267,6 +271,9 @@ discard block |
||
267 | 271 | return $tree; |
268 | 272 | } |
269 | 273 | |
274 | + /** |
|
275 | + * @param string $nowDir |
|
276 | + */ |
|
270 | 277 | private function getFileList($app, $nowDir) |
271 | 278 | { |
272 | 279 | $topDir = $app['config']['user_data_realdir']; |
@@ -326,6 +333,9 @@ discard block |
||
326 | 333 | return (strpos($targetDir, $topDir) === 0); |
327 | 334 | } |
328 | 335 | |
336 | + /** |
|
337 | + * @return string |
|
338 | + */ |
|
329 | 339 | private function convertStrFromServer($target) |
330 | 340 | { |
331 | 341 | if ($this->encode == self::SJIS) { |
@@ -89,20 +89,20 @@ discard block |
||
89 | 89 | $max = count($Blocks); |
90 | 90 | for ($i = 0; $i < $max; $i++) { |
91 | 91 | // block_id が取得できない場合は INSERT しない |
92 | - if (!isset($data['id_' . $i])) { |
|
92 | + if (!isset($data['id_'.$i])) { |
|
93 | 93 | continue; |
94 | 94 | } |
95 | 95 | // 未使用は INSERT しない |
96 | - if ($data['target_id_' . $i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) { |
|
96 | + if ($data['target_id_'.$i] == \Eccube\Entity\PageLayout::TARGET_ID_UNUSED) { |
|
97 | 97 | continue; |
98 | 98 | } |
99 | 99 | // 他のページに anywhere が存在する場合は INSERT しない |
100 | - $anywhere = (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) ? 1 : 0; |
|
101 | - if (isset($data['anywhere_' . $i]) && $data['anywhere_' . $i] == 1) { |
|
100 | + $anywhere = (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) ? 1 : 0; |
|
101 | + if (isset($data['anywhere_'.$i]) && $data['anywhere_'.$i] == 1) { |
|
102 | 102 | $Other = $app['orm.em']->getRepository('Eccube\Entity\BlockPosition') |
103 | 103 | ->findBy(array( |
104 | 104 | 'anywhere' => 1, |
105 | - 'block_id' => $data['id_' . $i], |
|
105 | + 'block_id' => $data['id_'.$i], |
|
106 | 106 | )); |
107 | 107 | if (count($Other) > 0) { |
108 | 108 | continue; |
@@ -112,14 +112,14 @@ discard block |
||
112 | 112 | $BlockPosition = new \Eccube\Entity\BlockPosition(); |
113 | 113 | $Block = $app['orm.em']->getRepository('Eccube\Entity\Block') |
114 | 114 | ->findOneBy(array( |
115 | - 'id' => $data['id_' . $i], |
|
115 | + 'id' => $data['id_'.$i], |
|
116 | 116 | 'DeviceType' => $DeviceType, |
117 | 117 | )); |
118 | 118 | $BlockPosition |
119 | 119 | ->setPageId($id) |
120 | - ->setBlockId($data['id_' . $i]) |
|
121 | - ->setBlockRow($data['top_' . $i]) |
|
122 | - ->setTargetId($data['target_id_' . $i]) |
|
120 | + ->setBlockId($data['id_'.$i]) |
|
121 | + ->setBlockRow($data['top_'.$i]) |
|
122 | + ->setTargetId($data['target_id_'.$i]) |
|
123 | 123 | ->setBlock($Block) |
124 | 124 | ->setPageLayout($TargetPageLayout) |
125 | 125 | ->setAnywhere($anywhere); |