| @@ -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,10 @@ discard block | ||
| 267 | 271 | return $tree; | 
| 268 | 272 | } | 
| 269 | 273 | |
| 274 | + /** | |
| 275 | + * @param Application $app | |
| 276 | + * @param string $nowDir | |
| 277 | + */ | |
| 270 | 278 | private function getFileList($app, $nowDir) | 
| 271 | 279 |      { | 
| 272 | 280 | $topDir = $app['config']['user_data_realdir']; | 
| @@ -326,6 +334,9 @@ discard block | ||
| 326 | 334 | return (strpos($targetDir, $topDir) === 0); | 
| 327 | 335 | } | 
| 328 | 336 | |
| 337 | + /** | |
| 338 | + * @return string | |
| 339 | + */ | |
| 329 | 340 | private function convertStrFromServer($target) | 
| 330 | 341 |      { | 
| 331 | 342 |          if ($this->encode == self::SJIS) { | 
| @@ -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; | 
| @@ -84,7 +84,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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); | 
| @@ -377,7 +377,7 @@ discard block | ||
| 377 | 377 | /** | 
| 378 | 378 | * フォームからの入直内容に基づいて、受注情報の再計算を行う | 
| 379 | 379 | * | 
| 380 | - * @param $app | |
| 380 | + * @param Application $app | |
| 381 | 381 | * @param $Order | 
| 382 | 382 | */ | 
| 383 | 383 | protected function calculate($app, \Eccube\Entity\Order $Order) | 
| @@ -471,7 +471,7 @@ discard block | ||
| 471 | 471 | * - 受注ステータスが入金済に設定された場合に入金日を更新 | 
| 472 | 472 | * | 
| 473 | 473 | * | 
| 474 | - * @param $app | |
| 474 | + * @param Application $app | |
| 475 | 475 | * @param $TargetOrder | 
| 476 | 476 | * @param $OriginOrder | 
| 477 | 477 | */ | 
| @@ -333,7 +333,7 @@ discard block | ||
| 333 | 333 |                  $session->set('eccube.admin.order.customer.search', $searchData); | 
| 334 | 334 |                  $session->set('eccube.admin.order.customer.search.page_no', $page_no); | 
| 335 | 335 |              } else { | 
| 336 | -                $searchData = (array)$session->get('eccube.admin.order.customer.search'); | |
| 336 | +                $searchData = (array) $session->get('eccube.admin.order.customer.search'); | |
| 337 | 337 |                  if (is_null($page_no)) { | 
| 338 | 338 |                      $page_no = intval($session->get('eccube.admin.order.customer.search.page_no')); | 
| 339 | 339 |                  } else { | 
| @@ -489,7 +489,7 @@ discard block | ||
| 489 | 489 |                  $session->set('eccube.admin.order.product.search', $searchData); | 
| 490 | 490 |                  $session->set('eccube.admin.order.product.search.page_no', $page_no); | 
| 491 | 491 |              } else { | 
| 492 | -                $searchData = (array)$session->get('eccube.admin.order.product.search'); | |
| 492 | +                $searchData = (array) $session->get('eccube.admin.order.product.search'); | |
| 493 | 493 |                  if (is_null($page_no)) { | 
| 494 | 494 |                      $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); | 
| 495 | 495 |                  } else { | 
| @@ -259,6 +259,9 @@ | ||
| 259 | 259 | } | 
| 260 | 260 | |
| 261 | 261 | |
| 262 | + /** | |
| 263 | + * @param Application $app | |
| 264 | + */ | |
| 262 | 265 | private function createBody($app, $header, $footer, $Order) | 
| 263 | 266 |      { | 
| 264 | 267 |          return $app->renderView('Mail/order.twig', array( | 
| @@ -336,10 +336,10 @@ | ||
| 336 | 336 | } | 
| 337 | 337 | } | 
| 338 | 338 |          } else { | 
| 339 | -            $filter = function ($v) { | |
| 339 | +            $filter = function($v) { | |
| 340 | 340 |                  return preg_match('/^ids\d+$/', $v); | 
| 341 | 341 | }; | 
| 342 | -            $map = function ($v) { | |
| 342 | +            $map = function($v) { | |
| 343 | 343 |                  return preg_replace('/[^\d+]/', '', $v); | 
| 344 | 344 | }; | 
| 345 | 345 | $keys = array_keys($request->query->all()); | 
| @@ -130,7 +130,7 @@ | ||
| 130 | 130 | /** | 
| 131 | 131 | * @param \Eccube\Entity\Member $Member | 
| 132 | 132 | * | 
| 133 | - * @return void | |
| 133 | + * @return boolean | |
| 134 | 134 | */ | 
| 135 | 135 | public function up(\Eccube\Entity\Member $Member) | 
| 136 | 136 |      { | 
| @@ -65,7 +65,7 @@ | ||
| 65 | 65 | * @param int|null|\Eccube\Entity\ProductClass $ProductClass 商品規格 | 
| 66 | 66 | * @param int|null|\Eccube\Entity\Master\Pref $Pref 都道府県 | 
| 67 | 67 | * @param int|null|\Eccube\Entity\Master\Country $Country 国 | 
| 68 | - * @return \Eccube\Entity\TaxRule 税設定情報 | |
| 68 | + * @return integer 税設定情報 | |
| 69 | 69 | * | 
| 70 | 70 | * @throws NoResultException | 
| 71 | 71 | */ | 
| @@ -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') | 
| @@ -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)) { | 
| @@ -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); | 
| @@ -95,7 +95,7 @@ | ||
| 95 | 95 |          $num = $app['eccube.repository.product_class']->createQueryBuilder('pc') | 
| 96 | 96 |              ->select('count(pc.id)') | 
| 97 | 97 |              ->where('pc.ClassCategory1 = :id OR pc.ClassCategory2 = :id') | 
| 98 | -            ->setParameter('id',$id) | |
| 98 | +            ->setParameter('id', $id) | |
| 99 | 99 | ->getQuery() | 
| 100 | 100 | ->getSingleScalarResult(); | 
| 101 | 101 |          if ($num > 0) { |