@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | new Assert\NotBlank(), |
| 92 | 92 | ), |
| 93 | 93 | )) |
| 94 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
| 94 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
| 95 | 95 | $form = $event->getForm(); |
| 96 | 96 | $data = $form->getData(); |
| 97 | 97 | try { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config); |
| 109 | 109 | $conn->connect(); |
| 110 | 110 | } catch (\Exception $e) { |
| 111 | - $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage())); |
|
| 111 | + $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage())); |
|
| 112 | 112 | } |
| 113 | 113 | }); |
| 114 | 114 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | { |
| 66 | 66 | // install.phpのチェック. |
| 67 | 67 | if (isset($app['config']['eccube_install']) && $app['config']['eccube_install'] == 1) { |
| 68 | - $file = $app['config']['root_dir'] . '/html/install.php'; |
|
| 68 | + $file = $app['config']['root_dir'].'/html/install.php'; |
|
| 69 | 69 | if (file_exists($file)) { |
| 70 | 70 | $app->addWarning('admin.install.warning', 'admin'); |
| 71 | 71 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $arrFileList = $this->getFileList($app, $nowDir); |
| 84 | 84 | |
| 85 | 85 | $javascript = $this->getJsArrayList($tree); |
| 86 | - $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '" . $nowDir . "', 'tree_select_file', 'tree_status', 'move');"; |
|
| 86 | + $onload = "eccube.fileManager.viewFileTree('tree', arrTree, '".$nowDir."', 'tree_select_file', 'tree_status', 'move');"; |
|
| 87 | 87 | |
| 88 | 88 | return $app->render('Content/file.twig', array( |
| 89 | 89 | 'form' => $form->createView(), |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $nowDir = $this->checkDir($request->get('now_dir'), $topDir) |
| 139 | 139 | ? $this->normalizePath($request->get('now_dir')) |
| 140 | 140 | : $topDir; |
| 141 | - $fs->mkdir($nowDir . '/' . $filename); |
|
| 141 | + $fs->mkdir($nowDir.'/'.$filename); |
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | { |
| 218 | 218 | $str = "arrTree = new Array();\n"; |
| 219 | 219 | foreach ($tree as $key => $val) { |
| 220 | - $str .= 'arrTree[' . $key . "] = new Array(" . $key . ", '" . $val['type'] . "', '" . $val['path'] . "', " . $val['rank'] . ','; |
|
| 220 | + $str .= 'arrTree['.$key."] = new Array(".$key.", '".$val['type']."', '".$val['path']."', ".$val['rank'].','; |
|
| 221 | 221 | if ($val['open']) { |
| 222 | 222 | $str .= "true);\n"; |
| 223 | 223 | } else { |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | private function getFileList($app, $nowDir) |
| 269 | 269 | { |
| 270 | 270 | $topDir = $app['config']['user_data_realdir']; |
| 271 | - $filter = function (\SplFileInfo $file) use ($topDir) { |
|
| 271 | + $filter = function(\SplFileInfo $file) use ($topDir) { |
|
| 272 | 272 | $acceptPath = realpath($topDir); |
| 273 | 273 | $targetPath = $file->getRealPath(); |
| 274 | 274 | return (strpos($targetPath, $acceptPath) === 0); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | 'label' => 'SSLを強制', |
| 71 | 71 | 'required' => false, |
| 72 | 72 | )) |
| 73 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($app) { |
|
| 73 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use ($app) { |
|
| 74 | 74 | $form = $event->getForm(); |
| 75 | 75 | $data = $form->getData(); |
| 76 | 76 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ) |
| 83 | 83 | ); |
| 84 | 84 | if ($errors->count() != 0) { |
| 85 | - $form['admin_allow_host']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
| 85 | + $form['admin_allow_host']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | }) |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | 'format' => 'yyyy-MM-dd', |
| 142 | 142 | 'required' => false, |
| 143 | 143 | )) |
| 144 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($BaseInfo) { |
|
| 144 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($BaseInfo) { |
|
| 145 | 145 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
| 146 | 146 | $form = $event->getForm(); |
| 147 | 147 | $form->add('ShipmentItems', 'collection', array( |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | )); |
| 153 | 153 | } |
| 154 | 154 | }) |
| 155 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
| 155 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
| 156 | 156 | /** @var \Eccube\Entity\Shipping $data */ |
| 157 | 157 | $data = $event->getData(); |
| 158 | 158 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | 'empty_value' => '指定なし', |
| 173 | 173 | 'empty_data' => null, |
| 174 | 174 | 'required' => false, |
| 175 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
| 175 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
| 176 | 176 | return $er->createQueryBuilder('dt') |
| 177 | 177 | ->where('dt.Delivery = :Delivery') |
| 178 | 178 | ->setParameter('Delivery', $Delivery); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | )); |
| 181 | 181 | |
| 182 | 182 | }) |
| 183 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
| 183 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
| 184 | 184 | $data = $event->getData(); |
| 185 | 185 | $form = $event->getForm(); |
| 186 | 186 | if (!$data) { |
@@ -201,14 +201,14 @@ discard block |
||
| 201 | 201 | 'empty_value' => '指定なし', |
| 202 | 202 | 'empty_data' => null, |
| 203 | 203 | 'required' => false, |
| 204 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
| 204 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
| 205 | 205 | return $er->createQueryBuilder('dt') |
| 206 | 206 | ->where('dt.Delivery = :Delivery') |
| 207 | 207 | ->setParameter('Delivery', $Delivery); |
| 208 | 208 | }, |
| 209 | 209 | )); |
| 210 | 210 | }) |
| 211 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
| 211 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
| 212 | 212 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
| 213 | 213 | $form = $event->getForm(); |
| 214 | 214 | $shipmentItems = $form['ShipmentItems']->getData(); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | 'help' => 'メーラーバックエンドがSMTPかつSMTP-AUTH使用時のみ指定', |
| 142 | 142 | 'required' => false, |
| 143 | 143 | )) |
| 144 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($app) { |
|
| 144 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use ($app) { |
|
| 145 | 145 | $form = $event->getForm(); |
| 146 | 146 | $data = $form->getData(); |
| 147 | 147 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | ) |
| 154 | 154 | ); |
| 155 | 155 | if ($errors->count() != 0) { |
| 156 | - $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
| 156 | + $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | }) |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | $qb = $this->createQueryBuilder('e') |
| 42 | 42 | ->innerJoin('e.Plugin', 'p') |
| 43 | 43 | ->andWhere('e.del_flg = 0 ') |
| 44 | - ->Orderby('e.event','ASC') |
|
| 45 | - ->addOrderby('e.priority','DESC'); |
|
| 44 | + ->Orderby('e.event', 'ASC') |
|
| 45 | + ->addOrderby('e.priority', 'DESC'); |
|
| 46 | 46 | ; |
| 47 | 47 | |
| 48 | 48 | return $qb->getQuery()->getResult(); |
@@ -50,62 +50,62 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public function getPriorityRange($type) |
| 52 | 52 | { |
| 53 | - if (PluginEventHandler::EVENT_HANDLER_TYPE_FIRST==$type) { |
|
| 54 | - $range_start=PluginEventHandler::EVENT_PRIORITY_FIRST_START; |
|
| 55 | - $range_end=PluginEventHandler::EVENT_PRIORITY_FIRST_END; |
|
| 56 | - } elseif (PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type) { |
|
| 57 | - $range_start=PluginEventHandler::EVENT_PRIORITY_LAST_START; |
|
| 58 | - $range_end=PluginEventHandler::EVENT_PRIORITY_LAST_END; |
|
| 53 | + if (PluginEventHandler::EVENT_HANDLER_TYPE_FIRST == $type) { |
|
| 54 | + $range_start = PluginEventHandler::EVENT_PRIORITY_FIRST_START; |
|
| 55 | + $range_end = PluginEventHandler::EVENT_PRIORITY_FIRST_END; |
|
| 56 | + } elseif (PluginEventHandler::EVENT_HANDLER_TYPE_LAST == $type) { |
|
| 57 | + $range_start = PluginEventHandler::EVENT_PRIORITY_LAST_START; |
|
| 58 | + $range_end = PluginEventHandler::EVENT_PRIORITY_LAST_END; |
|
| 59 | 59 | } else { |
| 60 | - $range_start=PluginEventHandler::EVENT_PRIORITY_NORMAL_START; |
|
| 61 | - $range_end=PluginEventHandler::EVENT_PRIORITY_NORMAL_END; |
|
| 60 | + $range_start = PluginEventHandler::EVENT_PRIORITY_NORMAL_START; |
|
| 61 | + $range_end = PluginEventHandler::EVENT_PRIORITY_NORMAL_END; |
|
| 62 | 62 | } |
| 63 | - return array($range_start,$range_end); |
|
| 63 | + return array($range_start, $range_end); |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - public function calcNewPriority($event , $type) |
|
| 66 | + public function calcNewPriority($event, $type) |
|
| 67 | 67 | { |
| 68 | - list($range_start,$range_end) = $this->getPriorityRange($type); |
|
| 68 | + list($range_start, $range_end) = $this->getPriorityRange($type); |
|
| 69 | 69 | |
| 70 | 70 | $qb = $this->createQueryBuilder('e'); |
| 71 | 71 | $qb->andWhere("e.priority >= $range_end ") |
| 72 | 72 | ->andWhere("e.priority <= $range_start ") |
| 73 | 73 | ->andWhere('e.event = :event') |
| 74 | - ->setParameter('event',$event) |
|
| 74 | + ->setParameter('event', $event) |
|
| 75 | 75 | ->setMaxResults(1) |
| 76 | - ->orderBy('e.priority','ASC'); |
|
| 76 | + ->orderBy('e.priority', 'ASC'); |
|
| 77 | 77 | |
| 78 | - $result=$qb->getQuery()->getResult(); |
|
| 78 | + $result = $qb->getQuery()->getResult(); |
|
| 79 | 79 | if (count($result)) { |
| 80 | - return $result[0]->getPriority() -1; |
|
| 80 | + return $result[0]->getPriority() - 1; |
|
| 81 | 81 | } else { |
| 82 | 82 | return $range_start; |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - public function upPriority($pluginEventHandler,$up=true) |
|
| 86 | + public function upPriority($pluginEventHandler, $up = true) |
|
| 87 | 87 | { |
| 88 | - list($range_start,$range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType()); |
|
| 88 | + list($range_start, $range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType()); |
|
| 89 | 89 | |
| 90 | 90 | $qb = $this->createQueryBuilder('e'); |
| 91 | 91 | |
| 92 | 92 | $qb->andWhere("e.priority >= $range_end ") |
| 93 | 93 | ->andWhere("e.priority <= $range_start ") |
| 94 | 94 | ->andWhere("e.del_flg = 0 ") |
| 95 | - ->andWhere('e.priority '.($up ? '>' : '<' ).' :pri') |
|
| 95 | + ->andWhere('e.priority '.($up ? '>' : '<').' :pri') |
|
| 96 | 96 | ->andWhere('e.event = :event') |
| 97 | - ->setParameter('event',$pluginEventHandler->getEvent()) |
|
| 98 | - ->setParameter('pri', $pluginEventHandler->getPriority() ) |
|
| 97 | + ->setParameter('event', $pluginEventHandler->getEvent()) |
|
| 98 | + ->setParameter('pri', $pluginEventHandler->getPriority()) |
|
| 99 | 99 | ->setMaxResults(1) |
| 100 | - ->orderBy('e.priority', ($up ? 'ASC':'DESC' ) ); |
|
| 100 | + ->orderBy('e.priority', ($up ? 'ASC' : 'DESC')); |
|
| 101 | 101 | |
| 102 | - $result=$qb->getQuery()->getResult(); |
|
| 102 | + $result = $qb->getQuery()->getResult(); |
|
| 103 | 103 | |
| 104 | 104 | if (count($result)) { |
| 105 | - $em =$this->getEntityManager(); |
|
| 105 | + $em = $this->getEntityManager(); |
|
| 106 | 106 | $em->getConnection()->beginTransaction(); |
| 107 | 107 | // 2個のentityのprioriryを入れ替える |
| 108 | - $tmp=$pluginEventHandler->getPriority(); |
|
| 108 | + $tmp = $pluginEventHandler->getPriority(); |
|
| 109 | 109 | $pluginEventHandler->setPriority($result[0]->getPriority()); |
| 110 | 110 | $result[0]->setPriority($tmp); |
| 111 | 111 | $em->persist($result[0]); |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function up(Schema $schema) |
| 39 | 39 | { |
| 40 | 40 | // this up() migration is auto-generated, please modify it to your needs |
| 41 | - $t=$schema->getTable('dtb_product_class'); |
|
| 41 | + $t = $schema->getTable('dtb_product_class'); |
|
| 42 | 42 | if (!$t->hasColumn('stock_unlimited') && $t->hasColumn('stock_unlimited_tmp')) { |
| 43 | 43 | $t->addColumn('stock_unlimited', 'smallint', array('NotNull'=>true, 'Default'=>0)); |
| 44 | 44 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | public function up(Schema $schema) |
| 40 | 40 | { |
| 41 | 41 | // this up() migration is auto-generated, please modify it to your needs |
| 42 | - $t=$schema->getTable('dtb_product_class'); |
|
| 42 | + $t = $schema->getTable('dtb_product_class'); |
|
| 43 | 43 | if ($t->hasColumn('stock_unlimited_tmp')) { |
| 44 | 44 | $this->addSql('update dtb_product_class set stock_unlimited = stock_unlimited_tmp;'); |
| 45 | 45 | $t->dropColumn('stock_unlimited_tmp'); |