@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if (is_callable($function)) { |
67 | 67 | return call_user_func_array($function, $arg_list); |
68 | 68 | } |
69 | - trigger_error('Called to an undefined function : php_'. $function, E_USER_WARNING); |
|
69 | + trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING); |
|
70 | 70 | |
71 | 71 | }, ['pre_escape' => 'html', 'is_safe' => ['html']]), |
72 | 72 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | public function getCsrfTokenForAnchor() |
155 | 155 | { |
156 | 156 | $token = $this->app['csrf.token_manager']->getToken(Constant::TOKEN_NAME)->getValue(); |
157 | - return 'token-for-anchor=\'' . $token . '\''; |
|
157 | + return 'token-for-anchor=\''.$token.'\''; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | public function getPriceFilter($number, $decimals = 0, $decPoint = '.', $thousandsSep = ',') |
190 | 190 | { |
191 | 191 | $price = number_format($number, $decimals, $decPoint, $thousandsSep); |
192 | - $price = '¥ ' . $price; |
|
192 | + $price = '¥ '.$price; |
|
193 | 193 | |
194 | 194 | return $price; |
195 | 195 | } |
@@ -32,6 +32,9 @@ |
||
32 | 32 | { |
33 | 33 | protected $trait_proxies_directory; |
34 | 34 | |
35 | + /** |
|
36 | + * @param string $dir |
|
37 | + */ |
|
35 | 38 | public function setTraitProxiesDirectory($dir) |
36 | 39 | { |
37 | 40 | $this->trait_proxies_directory = $dir; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $includedFiles = []; |
55 | 55 | |
56 | 56 | foreach ($this->paths as $path) { |
57 | - if ( ! is_dir($path)) { |
|
57 | + if (!is_dir($path)) { |
|
58 | 58 | throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path); |
59 | 59 | } |
60 | 60 | |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS), |
64 | 64 | \RecursiveIteratorIterator::LEAVES_ONLY |
65 | 65 | ), |
66 | - '/^.+' . preg_quote($this->fileExtension) . '$/i', |
|
66 | + '/^.+'.preg_quote($this->fileExtension).'$/i', |
|
67 | 67 | \RecursiveRegexIterator::GET_MATCH |
68 | 68 | ); |
69 | 69 | |
70 | 70 | foreach ($iterator as $file) { |
71 | 71 | $sourceFile = $file[0]; |
72 | 72 | |
73 | - if ( ! preg_match('(^phar:)i', $sourceFile)) { |
|
73 | + if (!preg_match('(^phar:)i', $sourceFile)) { |
|
74 | 74 | $sourceFile = realpath($sourceFile); |
75 | 75 | } |
76 | 76 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | foreach ($declared as $className) { |
102 | 102 | $rc = new \ReflectionClass($className); |
103 | 103 | $sourceFile = $rc->getFileName(); |
104 | - if (in_array($sourceFile, $includedFiles) && ! $this->isTransient($className)) { |
|
104 | + if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) { |
|
105 | 105 | $classes[] = $className; |
106 | 106 | } |
107 | 107 | } |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $builder->addEventListener( |
40 | 40 | FormEvents::PRE_SET_DATA, |
41 | - function (FormEvent $event) { |
|
41 | + function(FormEvent $event) { |
|
42 | 42 | $form = $event->getForm(); |
43 | 43 | $config = $form->getConfig(); |
44 | 44 | // data_classオプションが必要 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | return new \Mobile_Detect(); |
17 | 17 | }; |
18 | 18 | |
19 | - $app['mobile_detect.device_type'] = function ($app) { |
|
19 | + $app['mobile_detect.device_type'] = function($app) { |
|
20 | 20 | if ($app['mobile_detect']->isMobile()) { |
21 | 21 | return \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP; |
22 | 22 | } else { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | /** |
58 | 58 | * JoinClause constructor. |
59 | - * @param $leftJoin |
|
59 | + * @param boolean $leftJoin |
|
60 | 60 | * @param $join |
61 | 61 | * @param $alias |
62 | 62 | * @param $conditionType |
@@ -37,7 +37,7 @@ |
||
37 | 37 | |
38 | 38 | /** |
39 | 39 | * OrderByClause constructor. |
40 | - * @param $sort |
|
40 | + * @param string $sort |
|
41 | 41 | * @param string $order |
42 | 42 | */ |
43 | 43 | function __construct($sort, $order = 'asc') |
@@ -53,6 +53,9 @@ |
||
53 | 53 | $this->params = $params; |
54 | 54 | } |
55 | 55 | |
56 | + /** |
|
57 | + * @param Expr\Comparison $expr |
|
58 | + */ |
|
56 | 59 | private static function newWhereClause($expr, $x, $y) |
57 | 60 | { |
58 | 61 | if ($y) { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | const PRODUCT_SEARCH = 'Product.getQueryBuilderBySearchData'; |
30 | 30 | const PRODUCT_SEARCH_ADMIN = 'Product.getQueryBuilderBySearchDataForAdmin'; |
31 | - const PRODUCT_GET_FAVORITE = 'Product.getFavoriteProductQueryBuilderByCustomer'; |
|
31 | + const PRODUCT_GET_FAVORITE = 'Product.getFavoriteProductQueryBuilderByCustomer'; |
|
32 | 32 | |
33 | 33 | const CUSTOMER_SEARCH = 'Customer.getQueryBuilderBySearchData'; |
34 | 34 |
@@ -53,6 +53,9 @@ |
||
53 | 53 | |
54 | 54 | protected $app; |
55 | 55 | |
56 | + /** |
|
57 | + * @param \Pimple\Container $app |
|
58 | + */ |
|
56 | 59 | public function __construct($app) |
57 | 60 | { |
58 | 61 | $this->app = $app; |
@@ -35,7 +35,6 @@ |
||
35 | 35 | use Symfony\Component\Form\AbstractType; |
36 | 36 | use Symfony\Component\Form\Extension\Core\Type\CollectionType; |
37 | 37 | use Symfony\Component\Form\Extension\Core\Type\EmailType; |
38 | -use Symfony\Component\Form\Extension\Core\Type\FormType; |
|
39 | 38 | use Symfony\Component\Form\Extension\Core\Type\HiddenType; |
40 | 39 | use Symfony\Component\Form\Extension\Core\Type\MoneyType; |
41 | 40 | use Symfony\Component\Form\Extension\Core\Type\TextareaType; |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | /** |
257 | 257 | * 複数配送オプション有効時の画面制御を行う. |
258 | 258 | */ |
259 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
259 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
260 | 260 | |
261 | 261 | if ($BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) { |
262 | 262 | return; |
@@ -266,17 +266,16 @@ discard block |
||
266 | 266 | $orderDetails = &$data['OrderDetails']; |
267 | 267 | |
268 | 268 | // 数量0フィルター |
269 | - $quantityFilter = function ($v) { |
|
269 | + $quantityFilter = function($v) { |
|
270 | 270 | return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity']))); |
271 | 271 | }; |
272 | 272 | |
273 | 273 | // $shippings = &$data['Shippings']; |
274 | 274 | |
275 | 275 | // 数量を抽出 |
276 | - $getQuantity = function ($v) { |
|
276 | + $getQuantity = function($v) { |
|
277 | 277 | return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ? |
278 | - trim($v['quantity']) : |
|
279 | - 0; |
|
278 | + trim($v['quantity']) : 0; |
|
280 | 279 | }; |
281 | 280 | |
282 | 281 | // foreach ($shippings as &$shipping) { |
@@ -293,7 +292,7 @@ discard block |
||
293 | 292 | $orderDetail['quantity'] = 0; |
294 | 293 | |
295 | 294 | // 受注詳細と同じ商品規格のみ抽出 |
296 | - $productClassFilter = function ($v) use ($orderDetail) { |
|
295 | + $productClassFilter = function($v) use ($orderDetail) { |
|
297 | 296 | return $orderDetail['ProductClass'] === $v['ProductClass']; |
298 | 297 | }; |
299 | 298 | |
@@ -302,10 +301,9 @@ discard block |
||
302 | 301 | if (!empty($shipping['ShipmentItems'])) { |
303 | 302 | |
304 | 303 | // 同じ商品規格の受注詳細の価格を適用 |
305 | - $applyPrice = function (&$v) use ($orderDetail) { |
|
304 | + $applyPrice = function(&$v) use ($orderDetail) { |
|
306 | 305 | $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ? |
307 | - $orderDetail['price'] : |
|
308 | - $v['price']; |
|
306 | + $orderDetail['price'] : $v['price']; |
|
309 | 307 | }; |
310 | 308 | array_walk($shipping['ShipmentItems'], $applyPrice); |
311 | 309 | |
@@ -334,7 +332,7 @@ discard block |
||
334 | 332 | // } |
335 | 333 | // }); |
336 | 334 | // 選択された支払い方法の名称をエンティティにコピーする |
337 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
335 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
338 | 336 | $Order = $event->getData(); |
339 | 337 | $Payment = $Order->getPayment(); |
340 | 338 | if (!is_null($Payment)) { |
@@ -342,7 +340,7 @@ discard block |
||
342 | 340 | } |
343 | 341 | }); |
344 | 342 | // 会員受注の場合、会員の性別/職業/誕生日をエンティティにコピーする |
345 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
343 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
346 | 344 | $Order = $event->getData(); |
347 | 345 | $Customer = $Order->getCustomer(); |
348 | 346 | if (!is_null($Customer)) { |