| @@ -23,8 +23,6 @@ | ||
| 23 | 23 | |
| 24 | 24 | namespace Eccube\Service; | 
| 25 | 25 | |
| 26 | -use Eccube\Application; | |
| 27 | - | |
| 28 | 26 | |
| 29 | 27 | /** | 
| 30 | 28 | * Copyright (C) 2012-2014 David de Boer <[email protected]> | 
| @@ -117,9 +117,9 @@ discard block | ||
| 117 | 117 | |
| 118 | 118 | $this->file = $file; | 
| 119 | 119 | $this->file->setFlags( | 
| 120 | - \SplFileObject::READ_CSV | | |
| 121 | - \SplFileObject::SKIP_EMPTY | | |
| 122 | - \SplFileObject::READ_AHEAD | | |
| 120 | + \SplFileObject::READ_CSV| | |
| 121 | + \SplFileObject::SKIP_EMPTY| | |
| 122 | + \SplFileObject::READ_AHEAD| | |
| 123 | 123 | \SplFileObject::DROP_NEW_LINE | 
| 124 | 124 | ); | 
| 125 | 125 | $this->file->setCsvControl( | 
| @@ -362,7 +362,7 @@ discard block | ||
| 362 | 362 |              if ($count > 1) { | 
| 363 | 363 | $incrementedHeaders[] = $header; | 
| 364 | 364 |                  for ($i = 1; $i < $count; $i++) { | 
| 365 | - $incrementedHeaders[] = $header . $i; | |
| 365 | + $incrementedHeaders[] = $header.$i; | |
| 366 | 366 | } | 
| 367 | 367 |              } else { | 
| 368 | 368 | $incrementedHeaders[] = $header; | 
| @@ -413,7 +413,7 @@ discard block | ||
| 413 | 413 |      protected function convertEncodingRows($row) { | 
| 414 | 414 |          if ('\\' === DIRECTORY_SEPARATOR && PHP_VERSION_ID >= 70000) { | 
| 415 | 415 |              foreach ($row as &$col) { | 
| 416 | - $col = mb_convert_encoding($col , 'UTF-8', 'SJIS-win'); | |
| 416 | + $col = mb_convert_encoding($col, 'UTF-8', 'SJIS-win'); | |
| 417 | 417 | } | 
| 418 | 418 | } | 
| 419 | 419 | return $row; | 
| @@ -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) { | 
| @@ -38,7 +38,7 @@ | ||
| 38 | 38 | |
| 39 | 39 |          if ($app['eccube.layout']) { | 
| 40 | 40 |              foreach ($app['eccube.layout']->getBlocPositions() as $blocPositions) { | 
| 41 | -                if ($blocPositions->getTargetId() == constant("Eccube\Entity\BlocPosition::" . $position)) { | |
| 41 | +                if ($blocPositions->getTargetId() == constant("Eccube\Entity\BlocPosition::".$position)) { | |
| 42 | 42 | $blocks[] = $blocPositions->getBloc(); | 
| 43 | 43 | } | 
| 44 | 44 | } | 
| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) | 
| 33 | 33 |      { | 
| 34 | 34 |          if ($targetEntity->reflClass->getName() === 'Eccube\Entity\ProductClass') { | 
| 35 | - return $targetTableAlias . '.stock >= 1 OR ' . $targetTableAlias . '.stock_unlimited = 1'; | |
| 35 | + return $targetTableAlias.'.stock >= 1 OR '.$targetTableAlias.'.stock_unlimited = 1'; | |
| 36 | 36 |          } else { | 
| 37 | 37 | return ""; | 
| 38 | 38 | } | 
| @@ -33,12 +33,12 @@ | ||
| 33 | 33 |      { | 
| 34 | 34 | // 決済処理中/購入処理中を除く. | 
| 35 | 35 |          if ($targetEntity->reflClass->getName() === 'Eccube\Entity\Order') { | 
| 36 | - return $targetTableAlias . '.status <> 7 AND ' . $targetTableAlias . '.status <> 8'; | |
| 36 | + return $targetTableAlias.'.status <> 7 AND '.$targetTableAlias.'.status <> 8'; | |
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 | // 決済処理中/購入処理中を除く. | 
| 40 | 40 |          if ($targetEntity->reflClass->getName() === 'Eccube\Entity\Master\OrderStatus') { | 
| 41 | - return $targetTableAlias . '.id <> 7 AND ' . $targetTableAlias . '.id <> 8'; | |
| 41 | + return $targetTableAlias.'.id <> 7 AND '.$targetTableAlias.'.id <> 8'; | |
| 42 | 42 | } | 
| 43 | 43 | |
| 44 | 44 | return ''; | 
| @@ -46,7 +46,7 @@ | ||
| 46 | 46 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) | 
| 47 | 47 |      { | 
| 48 | 48 |          if ($targetEntity->hasField('del_flg') && !in_array($targetEntity->getName(), $this->getExcludes())) { | 
| 49 | - return $targetTableAlias . '.del_flg = 0'; | |
| 49 | + return $targetTableAlias.'.del_flg = 0'; | |
| 50 | 50 |          } else { | 
| 51 | 51 | return ""; | 
| 52 | 52 | } | 
| @@ -148,7 +148,7 @@ | ||
| 148 | 148 | 'required' => false, | 
| 149 | 149 | 'value' => 1, | 
| 150 | 150 | )) | 
| 151 | -            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { | |
| 151 | +            ->addEventListener(FormEvents::POST_SUBMIT, function($event) { | |
| 152 | 152 | $form = $event->getForm(); | 
| 153 | 153 | $data = $form->getData(); | 
| 154 | 154 | |
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 |  { | 
| 34 | 34 | protected $config; | 
| 35 | 35 | |
| 36 | - public function __construct ($config) | |
| 36 | + public function __construct($config) | |
| 37 | 37 |      { | 
| 38 | 38 | $this->config = $config; | 
| 39 | 39 | } |