@@ -197,7 +197,7 @@ |
||
| 197 | 197 | { |
| 198 | 198 | $responseData[] = [$k, $v]; |
| 199 | 199 | } |
| 200 | - }else { |
|
| 200 | + } else { |
|
| 201 | 201 | $responseData[] = [$key, $value]; |
| 202 | 202 | } |
| 203 | 203 | } |
@@ -141,12 +141,13 @@ discard block |
||
| 141 | 141 | |
| 142 | 142 | if($configuration['channel'] instanceof ChannelInterface) { |
| 143 | 143 | $storeIds[] = $configuration['channel']->getId(); |
| 144 | - }else if(is_array($configuration['channel']) && !in_array(0, $configuration['channel'])) { |
|
| 144 | + } else if(is_array($configuration['channel']) && !in_array(0, $configuration['channel'])) { |
|
| 145 | 145 | $storeIds = $configuration['channel']; |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - if(!(count($storeIds) > 0)) |
|
| 149 | - return; |
|
| 148 | + if(!(count($storeIds) > 0)) { |
|
| 149 | + return; |
|
| 150 | + } |
|
| 150 | 151 | |
| 151 | 152 | if(!$field) { |
| 152 | 153 | $alias = $this->qb->getRootAliases()[0]; |
@@ -167,8 +168,9 @@ discard block |
||
| 167 | 168 | if(isset($configuration['userGender']) && $configuration['userGender'] != null) { |
| 168 | 169 | $rootAlias = $cAlias = $this->qb->getRootAliases()[0]; |
| 169 | 170 | |
| 170 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 171 | - $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 171 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 172 | + $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 173 | + } |
|
| 172 | 174 | |
| 173 | 175 | $this->qb |
| 174 | 176 | ->andWhere($this->qb->expr()->in($cAlias.'.gender', $configuration['userGender'])) |
@@ -184,8 +186,9 @@ discard block |
||
| 184 | 186 | if(isset($configuration['userBuyer']) && $configuration['userBuyer'] != null && $configuration['userBuyer'] != 'both') { |
| 185 | 187 | $rootAlias = $this->qb->getRootAliases()[0]; |
| 186 | 188 | |
| 187 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 188 | - $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 189 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 190 | + $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 191 | + } |
|
| 189 | 192 | |
| 190 | 193 | $oAlias = $this->addLeftJoin('c.orders', 'o'); |
| 191 | 194 | |
@@ -194,7 +197,7 @@ discard block |
||
| 194 | 197 | ->andWhere($this->qb->expr()->isNotNull($oAlias.'.checkoutCompletedAt')) |
| 195 | 198 | ->andWhere($oAlias.'.itemsTotal > 0') |
| 196 | 199 | ; |
| 197 | - }else { |
|
| 200 | + } else { |
|
| 198 | 201 | $this->qb |
| 199 | 202 | ->andWhere($this->qb->expr()->isNull($oAlias.'.checkoutCompletedAt')) |
| 200 | 203 | ; |
@@ -212,8 +215,9 @@ discard block |
||
| 212 | 215 | if(isset($configuration[$type]) && $configuration[$type] != null) { |
| 213 | 216 | $rootAlias = $cAlias = $this->qb->getRootAliases()[0]; |
| 214 | 217 | |
| 215 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 216 | - $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 218 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 219 | + $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 220 | + } |
|
| 217 | 221 | |
| 218 | 222 | $caAlias = $this->addLeftJoin($cAlias.'.addresses', 'c'.substr($addressType, 0, 1).'a'); |
| 219 | 223 | |
@@ -233,8 +237,9 @@ discard block |
||
| 233 | 237 | if(isset($configuration[$type]) && $configuration[$type] != null) { |
| 234 | 238 | $rootAlias = $cAlias = $this->qb->getRootAliases()[0]; |
| 235 | 239 | |
| 236 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 237 | - $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 240 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 241 | + $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 242 | + } |
|
| 238 | 243 | |
| 239 | 244 | $caAlias = $this->addLeftJoin($cAlias.'.addresses', 'c'.substr($addressType, 0, 1).'a'); |
| 240 | 245 | |
@@ -254,8 +259,9 @@ discard block |
||
| 254 | 259 | if(isset($configuration[$type]) && $configuration[$type] != null) { |
| 255 | 260 | $rootAlias = $cAlias = $this->qb->getRootAliases()[0]; |
| 256 | 261 | |
| 257 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 258 | - $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 262 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 263 | + $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 264 | + } |
|
| 259 | 265 | |
| 260 | 266 | $caAlias = $this->addLeftJoin($cAlias.'.addresses', 'c'.substr($addressType, 0, 1).'a'); |
| 261 | 267 | |
@@ -275,8 +281,9 @@ discard block |
||
| 275 | 281 | if(isset($configuration[$type]) && $configuration[$type] != null) { |
| 276 | 282 | $rootAlias = $cAlias = $this->qb->getRootAliases()[0]; |
| 277 | 283 | |
| 278 | - if(!$this->hasRootEntity(Customer::class)) |
|
| 279 | - $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 284 | + if(!$this->hasRootEntity(Customer::class)) { |
|
| 285 | + $cAlias = $this->addLeftJoin($rootAlias.'.customer', 'c'); |
|
| 286 | + } |
|
| 280 | 287 | |
| 281 | 288 | $caAlias = $this->addLeftJoin($cAlias.'.addresses', 'c'.substr($addressType, 0, 1).'2a'); |
| 282 | 289 | |