Failed Conditions
Pull Request — experimental/3.1 (#2285)
by Kiyotaka
41:31
created
src/Eccube/Form/Type/ShippingMultipleType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $app = $this->app;
48 48
 
49 49
         $builder
50
-            ->addEventListener(FormEvents::POST_SET_DATA, function ($event) use ($app) {
50
+            ->addEventListener(FormEvents::POST_SET_DATA, function($event) use ($app) {
51 51
                 /** @var \Eccube\Entity\ShipmentItem $data */
52 52
                 $data = $event->getData();
53 53
                 /** @var \Symfony\Component\Form\Form $form */
Please login to merge, or discard this patch.
src/Eccube/Repository/BlockRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@
 block discarded – undo
187 187
             $this->app['config']['block_default_realdir'],
188 188
         );
189 189
         foreach ($readPaths as $readPath) {
190
-            $filePath = $readPath . '/' . $fileName . '.twig';
190
+            $filePath = $readPath.'/'.$fileName.'.twig';
191 191
             $fs = new Filesystem();
192 192
             if ($fs->exists($filePath)) {
193 193
                 return array(
Please login to merge, or discard this patch.
src/Eccube/Repository/PageLayoutRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@
 block discarded – undo
257 257
         }
258 258
 
259 259
         foreach ($readPaths as $readPath) {
260
-            $filePath = $readPath . '/' . $fileName . '.twig';
260
+            $filePath = $readPath.'/'.$fileName.'.twig';
261 261
             $fs = new Filesystem();
262 262
             if ($fs->exists($filePath)) {
263 263
                 return array(
Please login to merge, or discard this patch.
src/Eccube/Repository/PluginEventHandlerRepository.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
         $qb = $this->createQueryBuilder('e')
43 43
             ->innerJoin('e.Plugin', 'p')
44 44
             ->andWhere('e.del_flg = 0 ')  
45
-            ->Orderby('e.event','ASC') 
46
-            ->addOrderby('e.priority','DESC');
45
+            ->Orderby('e.event', 'ASC') 
46
+            ->addOrderby('e.priority', 'DESC');
47 47
             ;
48 48
 
49 49
         return $qb->getQuery()->getResult();
@@ -52,66 +52,66 @@  discard block
 block discarded – undo
52 52
     public function getPriorityRange($type)
53 53
     {
54 54
 
55
-        if(PluginEventHandler::EVENT_HANDLER_TYPE_FIRST==$type){
56
-            $range_start=PluginEventHandler::EVENT_PRIORITY_FIRST_START;
57
-            $range_end=PluginEventHandler::EVENT_PRIORITY_FIRST_END;
58
-        }elseif(PluginEventHandler::EVENT_HANDLER_TYPE_LAST==$type){
59
-            $range_start=PluginEventHandler::EVENT_PRIORITY_LAST_START;
60
-            $range_end=PluginEventHandler::EVENT_PRIORITY_LAST_END;
61
-        }else{
62
-            $range_start=PluginEventHandler::EVENT_PRIORITY_NORMAL_START;
63
-            $range_end=PluginEventHandler::EVENT_PRIORITY_NORMAL_END;
55
+        if (PluginEventHandler::EVENT_HANDLER_TYPE_FIRST == $type) {
56
+            $range_start = PluginEventHandler::EVENT_PRIORITY_FIRST_START;
57
+            $range_end = PluginEventHandler::EVENT_PRIORITY_FIRST_END;
58
+        }elseif (PluginEventHandler::EVENT_HANDLER_TYPE_LAST == $type) {
59
+            $range_start = PluginEventHandler::EVENT_PRIORITY_LAST_START;
60
+            $range_end = PluginEventHandler::EVENT_PRIORITY_LAST_END;
61
+        } else {
62
+            $range_start = PluginEventHandler::EVENT_PRIORITY_NORMAL_START;
63
+            $range_end = PluginEventHandler::EVENT_PRIORITY_NORMAL_END;
64 64
         }
65
-        return array($range_start,$range_end);
65
+        return array($range_start, $range_end);
66 66
 
67 67
     }
68 68
 
69
-    public function calcNewPriority($event , $type)
69
+    public function calcNewPriority($event, $type)
70 70
     {
71 71
 
72
-        list($range_start,$range_end) = $this->getPriorityRange($type);
72
+        list($range_start, $range_end) = $this->getPriorityRange($type);
73 73
 
74 74
         $qb = $this->createQueryBuilder('e');
75 75
         $qb->andWhere("e.priority >= $range_end ")
76 76
            ->andWhere("e.priority <= $range_start ")
77 77
            ->andWhere('e.event = :event')
78
-           ->setParameter('event',$event)
78
+           ->setParameter('event', $event)
79 79
            ->setMaxResults(1)
80
-           ->orderBy('e.priority','ASC');
80
+           ->orderBy('e.priority', 'ASC');
81 81
 
82
-        $result=$qb->getQuery()->getResult();
83
-        if(count($result)){
84
-             return $result[0]->getPriority() -1;
85
-        }else{
82
+        $result = $qb->getQuery()->getResult();
83
+        if (count($result)) {
84
+             return $result[0]->getPriority() - 1;
85
+        } else {
86 86
              return $range_start;
87 87
         }
88 88
 
89 89
     }
90 90
 
91
-    public function upPriority($pluginEventHandler,$up=true)
91
+    public function upPriority($pluginEventHandler, $up = true)
92 92
     {
93 93
 
94
-        list($range_start,$range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType());
94
+        list($range_start, $range_end) = $this->getPriorityRange($pluginEventHandler->getHandlerType());
95 95
 
96 96
         $qb = $this->createQueryBuilder('e');
97 97
 
98 98
         $qb->andWhere("e.priority >= $range_end ")
99 99
            ->andWhere("e.priority <= $range_start ")
100 100
            ->andWhere("e.del_flg = 0 ") 
101
-           ->andWhere('e.priority '.($up ?  '>' : '<' ).' :pri')
101
+           ->andWhere('e.priority '.($up ? '>' : '<').' :pri')
102 102
            ->andWhere('e.event = :event')
103
-           ->setParameter('event',$pluginEventHandler->getEvent())
104
-           ->setParameter('pri',  $pluginEventHandler->getPriority()  )
103
+           ->setParameter('event', $pluginEventHandler->getEvent())
104
+           ->setParameter('pri', $pluginEventHandler->getPriority())
105 105
            ->setMaxResults(1)
106
-           ->orderBy('e.priority', ($up ? 'ASC':'DESC' )  );
106
+           ->orderBy('e.priority', ($up ? 'ASC' : 'DESC'));
107 107
 
108
-        $result=$qb->getQuery()->getResult();
108
+        $result = $qb->getQuery()->getResult();
109 109
 
110
-        if(count($result)){
111
-            $em =$this->getEntityManager();
110
+        if (count($result)) {
111
+            $em = $this->getEntityManager();
112 112
             $em->getConnection()->beginTransaction();
113 113
             // 2個のentityのprioriryを入れ替える
114
-            $tmp=$pluginEventHandler->getPriority();
114
+            $tmp = $pluginEventHandler->getPriority();
115 115
             $pluginEventHandler->setPriority($result[0]->getPriority());
116 116
             $result[0]->setPriority($tmp);
117 117
             $em->persist($result[0]);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             $em->flush();
120 120
             $em->getConnection()->commit();
121 121
             # 移動する
122
-        }else{
122
+        } else {
123 123
             # 移動しない
124 124
             throw new PluginException("Can't swap");
125 125
         }
Please login to merge, or discard this patch.
src/Eccube/Security/Core/Encoder/PasswordEncoder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if ($this->config['auth_type'] == 'PLAIN') {
54 54
             $res = $raw;
55 55
         } else {
56
-            $res = hash_hmac($this->config['password_hash_algos'], $raw . ':' . $this->config['auth_magic'], $salt);
56
+            $res = hash_hmac($this->config['password_hash_algos'], $raw.':'.$this->config['auth_magic'], $salt);
57 57
         }
58 58
 
59 59
         return $res;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         } else {
82 82
             // 旧バージョン(2.11未満)からの移行を考慮
83 83
             if (empty($salt)) {
84
-                $hash = sha1($raw . ':' . $this->config['auth_magic']);
84
+                $hash = sha1($raw.':'.$this->config['auth_magic']);
85 85
             } else {
86 86
                 $hash = $this->encodePassword($raw, $salt);
87 87
             }
Please login to merge, or discard this patch.
src/Eccube/Util/Str.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
             return $value;
160 160
         }
161 161
 
162
-        return rtrim(mb_substr($value, 0, $length, 'UTF-8')) . $end;
162
+        return rtrim(mb_substr($value, 0, $length, 'UTF-8')).$end;
163 163
     }
164 164
 
165 165
 
@@ -186,18 +186,18 @@  discard block
 block discarded – undo
186 186
         }
187 187
         if ($diff->m == 1 || $diff->days > 0) {
188 188
             if ($diff->days <= 31) {
189
-                return $diff->days . '日前';
189
+                return $diff->days.'日前';
190 190
             }
191 191
             // return $date->format("Y/m/d H:i");
192 192
             return $date->format("Y/m/d");
193 193
         }
194 194
         if ($diff->h > 0) {
195
-            return $diff->h . "時間前";
195
+            return $diff->h."時間前";
196 196
         }
197 197
         if ($diff->i > 0) {
198
-            return $diff->i . "分前";
198
+            return $diff->i."分前";
199 199
         }
200
-        return $diff->s . "秒前";
200
+        return $diff->s."秒前";
201 201
     }
202 202
 
203 203
     /**
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/AuthorityRoleType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
                 'label' => '拒否URL',
60 60
                 'required' => false,
61 61
             ))
62
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
62
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
63 63
                 $form = $event->getForm();
64 64
 
65 65
                 $Authority = $form['Authority']->getData();
Please login to merge, or discard this patch.
src/Eccube/Security/Voter/AuthorityVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     public function __construct(Application $app)
38 38
     {
39
-        $this->app     = $app;
39
+        $this->app = $app;
40 40
     }
41 41
 
42 42
     public function supportsAttribute($attribute)
Please login to merge, or discard this patch.
src/Eccube/Controller/Mypage/WithdrawController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
                     // 会員削除
61 61
                     $email = $Customer->getEmail();
62 62
                     // メールアドレスにダミーをセット
63
-                    $Customer->setEmail(Str::random(60) . '@dummy.dummy');
63
+                    $Customer->setEmail(Str::random(60).'@dummy.dummy');
64 64
                     $Customer->setDelFlg(Constant::ENABLED);
65 65
 
66 66
                     $app['orm.em']->flush();
Please login to merge, or discard this patch.