@@ -36,6 +36,9 @@ discard block |
||
36 | 36 | const EVENT_YML = 'event.yml'; |
37 | 37 | private $app; |
38 | 38 | |
39 | + /** |
|
40 | + * @param \Silex\Application $app |
|
41 | + */ |
|
39 | 42 | public function __construct($app) |
40 | 43 | { |
41 | 44 | $this->app = $app; |
@@ -98,6 +101,9 @@ discard block |
||
98 | 101 | } |
99 | 102 | } |
100 | 103 | |
104 | + /** |
|
105 | + * @param string $dir |
|
106 | + */ |
|
101 | 107 | public function unpackPluginArchive($archive, $dir) |
102 | 108 | { |
103 | 109 | $extension = pathinfo($archive, PATHINFO_EXTENSION); |
@@ -116,6 +122,9 @@ discard block |
||
116 | 122 | } |
117 | 123 | } |
118 | 124 | |
125 | + /** |
|
126 | + * @param string $dir |
|
127 | + */ |
|
119 | 128 | public function checkPluginArchiveContent($dir) |
120 | 129 | { |
121 | 130 | $meta = $this->readYml($dir.'/config.yml'); |
@@ -138,6 +147,9 @@ discard block |
||
138 | 147 | } |
139 | 148 | } |
140 | 149 | |
150 | + /** |
|
151 | + * @param string $yml |
|
152 | + */ |
|
141 | 153 | public function readYml($yml) |
142 | 154 | { |
143 | 155 | return Yaml::Parse($yml); |
@@ -151,6 +163,9 @@ discard block |
||
151 | 163 | // ディレクトリ名などに使われれるので厳しめ |
152 | 164 | } |
153 | 165 | |
166 | + /** |
|
167 | + * @param string $path |
|
168 | + */ |
|
154 | 169 | public function deleteFile($path) |
155 | 170 | { |
156 | 171 | $f = new Filesystem(); |
@@ -170,6 +185,9 @@ discard block |
||
170 | 185 | return $this->app['config']['plugin_realdir'].'/'.$name; |
171 | 186 | } |
172 | 187 | |
188 | + /** |
|
189 | + * @param string $d |
|
190 | + */ |
|
173 | 191 | public function createPluginDir($d) |
174 | 192 | { |
175 | 193 | $b = mkdir($d); |
@@ -229,6 +247,9 @@ discard block |
||
229 | 247 | return $p; |
230 | 248 | } |
231 | 249 | |
250 | + /** |
|
251 | + * @param string $method |
|
252 | + */ |
|
232 | 253 | public function callPluginManagerMethod($meta, $method) |
233 | 254 | { |
234 | 255 | $class = '\\Plugin'.'\\'.$meta['code'].'\\'.'PluginManager'; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | if (!empty($config_cache)) { |
125 | 125 | $meta = $config_cache; |
126 | 126 | } else { |
127 | - $meta = $this->readYml($dir . '/config.yml'); |
|
127 | + $meta = $this->readYml($dir.'/config.yml'); |
|
128 | 128 | } |
129 | 129 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
130 | 130 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -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 |
@@ -52,11 +52,17 @@ |
||
52 | 52 | return $form; |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param Application $app |
|
57 | + */ |
|
55 | 58 | protected function getSecurity($app) |
56 | 59 | { |
57 | 60 | return $app['security.token_storage']; |
58 | 61 | } |
59 | 62 | |
63 | + /** |
|
64 | + * @param Application $app |
|
65 | + */ |
|
60 | 66 | protected function isTokenValid($app) |
61 | 67 | { |
62 | 68 | $csrf = $app['form.csrf_provider']; |
@@ -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); |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $em->getConfiguration()->setSQLLogger(null); |
172 | 172 | |
173 | 173 | $response = new StreamedResponse(); |
174 | - $response->setCallback(function () use ($app, $request) { |
|
174 | + $response->setCallback(function() use ($app, $request) { |
|
175 | 175 | |
176 | 176 | // CSV種別を元に初期化. |
177 | 177 | $app['eccube.service.csv.export']->initCsvType(CsvType::CSV_TYPE_CUSTOMER); |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | // データ行の出力. |
187 | 187 | $app['eccube.service.csv.export']->setExportQueryBuilder($qb); |
188 | - $app['eccube.service.csv.export']->exportData(function ($entity, $csvService) { |
|
188 | + $app['eccube.service.csv.export']->exportData(function($entity, $csvService) { |
|
189 | 189 | |
190 | 190 | $Csvs = $csvService->getCsvs(); |
191 | 191 | |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | }); |
208 | 208 | |
209 | 209 | $now = new \DateTime(); |
210 | - $filename = 'customer_' . $now->format('YmdHis') . '.csv'; |
|
210 | + $filename = 'customer_'.$now->format('YmdHis').'.csv'; |
|
211 | 211 | $response->headers->set('Content-Type', 'application/octet-stream'); |
212 | - $response->headers->set('Content-Disposition', 'attachment; filename=' . $filename); |
|
212 | + $response->headers->set('Content-Disposition', 'attachment; filename='.$filename); |
|
213 | 213 | $response->send(); |
214 | 214 | |
215 | 215 | return $response; |