@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | * @param mixed $default Value returned if requested key isn't found |
28 | 28 | * @return mixed Value associated to the requested key |
29 | 29 | */ |
30 | - public function get($name, $default = null); |
|
30 | + public function get( $name, $default = null ); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Sets the value for the specified key. |
@@ -36,5 +36,5 @@ discard block |
||
36 | 36 | * @param mixed $value Value that should be associated with the given path |
37 | 37 | * @return null |
38 | 38 | */ |
39 | - public function set($name, $value); |
|
39 | + public function set( $name, $value ); |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | { |
53 | 53 | $name = trim( $name, '/' ); |
54 | 54 | |
55 | - if( isset( $this->negCache[ $name ] ) ) { |
|
55 | + if( isset( $this->negCache[$name] ) ) { |
|
56 | 56 | return $default; |
57 | 57 | } |
58 | 58 | |
59 | 59 | if( array_key_exists( $name, $this->cache ) ) { |
60 | - return $this->cache[ $name ]; |
|
60 | + return $this->cache[$name]; |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | if( ( $value = $this->getValueFromArray( $this->config, explode( '/', $name ) ) ) === null ) { |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | |
67 | 67 | if( $value === null ) |
68 | 68 | { |
69 | - $this->negCache[ $name ] = true; |
|
69 | + $this->negCache[$name] = true; |
|
70 | 70 | return $default; |
71 | 71 | } |
72 | 72 | |
73 | - $this->cache[ $name ] = $value; |
|
73 | + $this->cache[$name] = $value; |
|
74 | 74 | return $value; |
75 | 75 | } |
76 | 76 | |
@@ -87,15 +87,15 @@ discard block |
||
87 | 87 | |
88 | 88 | if( $value !== null ) |
89 | 89 | { |
90 | - $this->cache[ $name ] = $value; |
|
90 | + $this->cache[$name] = $value; |
|
91 | 91 | |
92 | - if( isset( $this->negCache[ $name ] ) ) { |
|
93 | - unset( $this->negCache[ $name ] ); |
|
92 | + if( isset( $this->negCache[$name] ) ) { |
|
93 | + unset( $this->negCache[$name] ); |
|
94 | 94 | } |
95 | 95 | } |
96 | 96 | else |
97 | 97 | { |
98 | - $this->negCache[ $name ] = true; |
|
98 | + $this->negCache[$name] = true; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | // don't store local configuration |
@@ -92,8 +92,7 @@ |
||
92 | 92 | if( isset( $this->negCache[ $name ] ) ) { |
93 | 93 | unset( $this->negCache[ $name ] ); |
94 | 94 | } |
95 | - } |
|
96 | - else |
|
95 | + } else |
|
97 | 96 | { |
98 | 97 | $this->negCache[ $name ] = true; |
99 | 98 | } |
@@ -19,8 +19,8 @@ |
||
19 | 19 | |
20 | 20 | $servManager = \Aimeos\MShop\Service\Manager\Factory::createManager( $this->context ); |
21 | 21 | $search = $servManager->createSearch(); |
22 | - $search->setConditions($search->compare('==', 'service.provider', 'Standard')); |
|
23 | - $result = $servManager->searchItems($search, array('price')); |
|
22 | + $search->setConditions( $search->compare( '==', 'service.provider', 'Standard' ) ); |
|
23 | + $result = $servManager->searchItems( $search, array( 'price' ) ); |
|
24 | 24 | |
25 | 25 | if( ( $item = reset( $result ) ) === false ) { |
26 | 26 | throw new \RuntimeException( 'No order base item found' ); |
@@ -337,8 +337,7 @@ |
||
337 | 337 | * @see mshop/service/manager/standard/count/ansi |
338 | 338 | */ |
339 | 339 | $path = 'mshop/service/manager/standard/insert'; |
340 | - } |
|
341 | - else |
|
340 | + } else |
|
342 | 341 | { |
343 | 342 | /** mshop/service/manager/standard/update/mysql |
344 | 343 | * Updates an existing service record in the database |
@@ -455,6 +455,7 @@ |
||
455 | 455 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
456 | 456 | * @param string[] $ref List of domains to fetch list items and referenced items for |
457 | 457 | * @param integer|null &$total Number of items that are available in total |
458 | + * @param integer $total |
|
458 | 459 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
459 | 460 | */ |
460 | 461 | public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null ) |
@@ -324,8 +324,7 @@ |
||
324 | 324 | * @see mshop/media/manager/standard/count/ansi |
325 | 325 | */ |
326 | 326 | $path = 'mshop/media/manager/standard/insert'; |
327 | - } |
|
328 | - else |
|
327 | + } else |
|
329 | 328 | { |
330 | 329 | /** mshop/media/manager/standard/update/mysql |
331 | 330 | * Updates an existing media record in the database |
@@ -210,8 +210,7 @@ |
||
210 | 210 | * @see mshop/text/manager/standard/count/ansi |
211 | 211 | */ |
212 | 212 | $path = 'mshop/text/manager/standard/insert'; |
213 | - } |
|
214 | - else |
|
213 | + } else |
|
215 | 214 | { |
216 | 215 | /** mshop/text/manager/standard/update/mysql |
217 | 216 | * Updates an existing text record in the database |
@@ -64,8 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $copy->setId( null ); |
66 | 66 | $copy->setRefId( $id ); |
67 | - } |
|
68 | - else |
|
67 | + } else |
|
69 | 68 | { |
70 | 69 | $copy = $listItems[$listRef[$id]]; |
71 | 70 | $ids[] = $listRef[$id]; |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * Creates the items with address item, list items and referenced items. |
96 | 96 | * |
97 | 97 | * @param array $map Associative list of IDs as keys and the associative array of values |
98 | - * @param array $domains List of domains to fetch list items and referenced items for |
|
98 | + * @param string[] $domains List of domains to fetch list items and referenced items for |
|
99 | 99 | * @param string $prefix Domain prefix |
100 | 100 | * @param array $local Associative list of IDs as keys and the associative array of items as values |
101 | 101 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function updateListItems( \Aimeos\MShop\Common\Item\ListRef\Iface $item, array $map, $domain, $type ) |
36 | 36 | { |
37 | - $listManager = $this->getObject()->getSubManager( 'lists' ); |
|
37 | + $listManager = $this->getObject()->getSubManager( 'lists' ); |
|
38 | 38 | |
39 | 39 | if( !isset( $this->typeIds[$domain][$type] ) ) |
40 | 40 | { |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | $search = $manager->createSearch( true ); |
160 | 160 | |
161 | 161 | $expr = array( |
162 | - $search->compare( '==', $prefix . '.lists.parentid', $ids ), |
|
163 | - $search->compare( '==', $prefix . '.lists.domain', $domains ), |
|
162 | + $search->compare( '==', $prefix.'.lists.parentid', $ids ), |
|
163 | + $search->compare( '==', $prefix.'.lists.domain', $domains ), |
|
164 | 164 | $search->getConditions(), |
165 | 165 | ); |
166 | 166 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | |
191 | 191 | $search = $manager->createSearch( true ); |
192 | 192 | $expr = array( |
193 | - $search->compare( '==', str_replace( '/', '.', $domain ) . '.id', array_keys( $list ) ), |
|
193 | + $search->compare( '==', str_replace( '/', '.', $domain ).'.id', array_keys( $list ) ), |
|
194 | 194 | $search->getConditions(), |
195 | 195 | ); |
196 | 196 | $search->setConditions( $search->combine( '&&', $expr ) ); |
@@ -163,8 +163,8 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function createItem() |
165 | 165 | { |
166 | - $values = array('supplier.siteid' => $this->getContext()->getLocale()->getSiteId()); |
|
167 | - return $this->createItemBase($values); |
|
166 | + $values = array( 'supplier.siteid' => $this->getContext()->getLocale()->getSiteId() ); |
|
167 | + return $this->createItemBase( $values ); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * @see mshop/supplier/manager/standard/delete/ansi |
543 | 543 | * @see mshop/supplier/manager/standard/search/ansi |
544 | 544 | */ |
545 | - $cfgPathCount = 'mshop/supplier/manager/standard/count'; |
|
545 | + $cfgPathCount = 'mshop/supplier/manager/standard/count'; |
|
546 | 546 | |
547 | 547 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); |
548 | 548 | while( ( $row = $results->fetch() ) !== false ) { |
@@ -581,10 +581,10 @@ discard block |
||
581 | 581 | * @param boolean $default |
582 | 582 | * @return \Aimeos\MW\Criteria\Iface |
583 | 583 | */ |
584 | - public function createSearch($default = false) |
|
584 | + public function createSearch( $default = false ) |
|
585 | 585 | { |
586 | - if ($default) { |
|
587 | - return $this->createSearchBase('supplier'); |
|
586 | + if( $default ) { |
|
587 | + return $this->createSearchBase( 'supplier' ); |
|
588 | 588 | } |
589 | 589 | |
590 | 590 | return parent::createSearch(); |
@@ -303,8 +303,7 @@ |
||
303 | 303 | * @see mshop/supplier/manager/standard/count/ansi |
304 | 304 | */ |
305 | 305 | $path = 'mshop/supplier/manager/standard/insert'; |
306 | - } |
|
307 | - else |
|
306 | + } else |
|
308 | 307 | { |
309 | 308 | /** mshop/supplier/manager/standard/update/mysql |
310 | 309 | * Updates an existing supplier record in the database |
@@ -417,6 +417,7 @@ discard block |
||
417 | 417 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
418 | 418 | * @param string[] $ref List of domains to fetch list items and referenced items for |
419 | 419 | * @param integer|null &$total Number of items that are available in total |
420 | + * @param integer $total |
|
420 | 421 | * @return array List of supplier items implementing \Aimeos\MShop\Supplier\Item\Iface |
421 | 422 | */ |
422 | 423 | public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null ) |
@@ -615,7 +616,6 @@ discard block |
||
615 | 616 | /** |
616 | 617 | * Returns the address items for the given supplier IDs |
617 | 618 | * |
618 | - * @param array $prodIds List of supplier IDs |
|
619 | 619 | * @return array Associative list of supplier IDs / address IDs as keys and items implementing |
620 | 620 | * \Aimeos\MShop\Common\Item\Address\Iface as values |
621 | 621 | */ |
@@ -289,8 +289,7 @@ |
||
289 | 289 | * @see mshop/customer/manager/group/standard/count/ansi |
290 | 290 | */ |
291 | 291 | $path = 'mshop/customer/manager/group/standard/insert'; |
292 | - } |
|
293 | - else |
|
292 | + } else |
|
294 | 293 | { |
295 | 294 | /** mshop/customer/manager/group/standard/update/mysql |
296 | 295 | * Updates an existing customer group record in the database |
@@ -403,6 +403,7 @@ |
||
403 | 403 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
404 | 404 | * @param string[] $ref List of domains to fetch list items and referenced items for |
405 | 405 | * @param integer|null &$total Number of items that are available in total |
406 | + * @param integer $total |
|
406 | 407 | * @return array List of items implementing \Aimeos\MShop\Customer\Item\Group\Iface |
407 | 408 | */ |
408 | 409 | public function searchItems( \Aimeos\MW\Criteria\Iface $search, array $ref = [], &$total = null ) |