@@ -7,15 +7,15 @@ |
||
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | error_reporting( -1 ); |
| 10 | -ini_set( 'display_errors', '1' ); |
|
| 10 | +ini_set('display_errors', '1'); |
|
| 11 | 11 | |
| 12 | -date_default_timezone_set( 'UTC' ); |
|
| 12 | +date_default_timezone_set('UTC'); |
|
| 13 | 13 | |
| 14 | 14 | // Set locale settings to reasonable defaults |
| 15 | -setlocale( LC_ALL, 'en_US.UTF-8' ); |
|
| 16 | -setlocale( LC_NUMERIC, 'POSIX' ); |
|
| 17 | -setlocale( LC_CTYPE, 'en_US.UTF-8' ); |
|
| 18 | -setlocale( LC_TIME, 'POSIX' ); |
|
| 15 | +setlocale(LC_ALL, 'en_US.UTF-8'); |
|
| 16 | +setlocale(LC_NUMERIC, 'POSIX'); |
|
| 17 | +setlocale(LC_CTYPE, 'en_US.UTF-8'); |
|
| 18 | +setlocale(LC_TIME, 'POSIX'); |
|
| 19 | 19 | |
| 20 | 20 | require_once 'TestHelperJadm.php'; |
| 21 | 21 | \TestHelperJadm::bootstrap(); |
@@ -107,17 +107,17 @@ |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 109 | 109 | */ |
| 110 | - protected function getListItems( array $items, array $include ) |
|
| 110 | + protected function getListItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'text/lists' ); |
|
| 112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'text/lists'); |
|
| 113 | 113 | |
| 114 | 114 | $search = $manager->createSearch(); |
| 115 | 115 | $expr = array( |
| 116 | - $search->compare( '==', 'text.lists.parentid', array_keys( $items ) ), |
|
| 117 | - $search->compare( '==', 'text.lists.domain', $include ), |
|
| 116 | + $search->compare('==', 'text.lists.parentid', array_keys($items)), |
|
| 117 | + $search->compare('==', 'text.lists.domain', $include), |
|
| 118 | 118 | ); |
| 119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 119 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 120 | 120 | |
| 121 | - return $manager->searchItems( $search ); |
|
| 121 | + return $manager->searchItems($search); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 109 | 109 | */ |
| 110 | - protected function getListItems( array $items, array $include ) |
|
| 110 | + protected function getListItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'price/lists' ); |
|
| 112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'price/lists'); |
|
| 113 | 113 | |
| 114 | 114 | $search = $manager->createSearch(); |
| 115 | 115 | $expr = array( |
| 116 | - $search->compare( '==', 'price.lists.parentid', array_keys( $items ) ), |
|
| 117 | - $search->compare( '==', 'price.lists.domain', $include ), |
|
| 116 | + $search->compare('==', 'price.lists.parentid', array_keys($items)), |
|
| 117 | + $search->compare('==', 'price.lists.domain', $include), |
|
| 118 | 118 | ); |
| 119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 119 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 120 | 120 | |
| 121 | - return $manager->searchItems( $search ); |
|
| 121 | + return $manager->searchItems($search); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 109 | 109 | */ |
| 110 | - protected function getListItems( array $items, array $include ) |
|
| 110 | + protected function getListItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'attribute/lists' ); |
|
| 112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'attribute/lists'); |
|
| 113 | 113 | |
| 114 | 114 | $search = $manager->createSearch(); |
| 115 | 115 | $expr = array( |
| 116 | - $search->compare( '==', 'attribute.lists.parentid', array_keys( $items ) ), |
|
| 117 | - $search->compare( '==', 'attribute.lists.domain', $include ), |
|
| 116 | + $search->compare('==', 'attribute.lists.parentid', array_keys($items)), |
|
| 117 | + $search->compare('==', 'attribute.lists.domain', $include), |
|
| 118 | 118 | ); |
| 119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 119 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 120 | 120 | |
| 121 | - return $manager->searchItems( $search ); |
|
| 121 | + return $manager->searchItems($search); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 109 | 109 | */ |
| 110 | - protected function getListItems( array $items, array $include ) |
|
| 110 | + protected function getListItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'service/lists' ); |
|
| 112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'service/lists'); |
|
| 113 | 113 | |
| 114 | 114 | $search = $manager->createSearch(); |
| 115 | 115 | $expr = array( |
| 116 | - $search->compare( '==', 'service.lists.parentid', array_keys( $items ) ), |
|
| 117 | - $search->compare( '==', 'service.lists.domain', $include ), |
|
| 116 | + $search->compare('==', 'service.lists.parentid', array_keys($items)), |
|
| 117 | + $search->compare('==', 'service.lists.domain', $include), |
|
| 118 | 118 | ); |
| 119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 119 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 120 | 120 | |
| 121 | - return $manager->searchItems( $search ); |
|
| 121 | + return $manager->searchItems($search); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -107,17 +107,17 @@ |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 109 | 109 | */ |
| 110 | - protected function getListItems( array $items, array $include ) |
|
| 110 | + protected function getListItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'media/lists' ); |
|
| 112 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'media/lists'); |
|
| 113 | 113 | |
| 114 | 114 | $search = $manager->createSearch(); |
| 115 | 115 | $expr = array( |
| 116 | - $search->compare( '==', 'media.lists.parentid', array_keys( $items ) ), |
|
| 117 | - $search->compare( '==', 'media.lists.domain', $include ), |
|
| 116 | + $search->compare('==', 'media.lists.parentid', array_keys($items)), |
|
| 117 | + $search->compare('==', 'media.lists.domain', $include), |
|
| 118 | 118 | ); |
| 119 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 119 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 120 | 120 | |
| 121 | - return $manager->searchItems( $search ); |
|
| 121 | + return $manager->searchItems($search); |
|
| 122 | 122 | } |
| 123 | 123 | } |
@@ -107,20 +107,20 @@ discard block |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
| 109 | 109 | */ |
| 110 | - protected function getChildItems( array $items, array $include ) |
|
| 110 | + protected function getChildItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | 112 | $list = []; |
| 113 | - $prodIds = array_keys( $items ); |
|
| 114 | - $include = array_intersect( $include, array( 'product/property' ) ); |
|
| 113 | + $prodIds = array_keys($items); |
|
| 114 | + $include = array_intersect($include, array('product/property')); |
|
| 115 | 115 | |
| 116 | - foreach( $include as $type ) |
|
| 116 | + foreach ($include as $type) |
|
| 117 | 117 | { |
| 118 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type ); |
|
| 118 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type); |
|
| 119 | 119 | |
| 120 | 120 | $search = $manager->createSearch(); |
| 121 | - $search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.parentid', $prodIds ) ); |
|
| 121 | + $search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.parentid', $prodIds)); |
|
| 122 | 122 | |
| 123 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
| 123 | + $list = array_merge($list, $manager->searchItems($search)); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | return $list; |
@@ -134,17 +134,17 @@ discard block |
||
| 134 | 134 | * @param array $include List of resource types that should be fetched |
| 135 | 135 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 136 | 136 | */ |
| 137 | - protected function getListItems( array $items, array $include ) |
|
| 137 | + protected function getListItems(array $items, array $include) |
|
| 138 | 138 | { |
| 139 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'product/lists' ); |
|
| 139 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'product/lists'); |
|
| 140 | 140 | |
| 141 | 141 | $search = $manager->createSearch(); |
| 142 | 142 | $expr = array( |
| 143 | - $search->compare( '==', 'product.lists.parentid', array_keys( $items ) ), |
|
| 144 | - $search->compare( '==', 'product.lists.domain', $include ), |
|
| 143 | + $search->compare('==', 'product.lists.parentid', array_keys($items)), |
|
| 144 | + $search->compare('==', 'product.lists.domain', $include), |
|
| 145 | 145 | ); |
| 146 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 146 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 147 | 147 | |
| 148 | - return $manager->searchItems( $search ); |
|
| 148 | + return $manager->searchItems($search); |
|
| 149 | 149 | } |
| 150 | 150 | } |
@@ -107,20 +107,20 @@ discard block |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
| 109 | 109 | */ |
| 110 | - protected function getChildItems( array $items, array $include ) |
|
| 110 | + protected function getChildItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | 112 | $list = []; |
| 113 | - $refIds = array_keys( $items ); |
|
| 114 | - $include = array_intersect( $include, array( 'customer/address' ) ); |
|
| 113 | + $refIds = array_keys($items); |
|
| 114 | + $include = array_intersect($include, array('customer/address')); |
|
| 115 | 115 | |
| 116 | - foreach( $include as $type ) |
|
| 116 | + foreach ($include as $type) |
|
| 117 | 117 | { |
| 118 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type ); |
|
| 118 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type); |
|
| 119 | 119 | |
| 120 | 120 | $search = $manager->createSearch(); |
| 121 | - $search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.parentid', $refIds ) ); |
|
| 121 | + $search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.parentid', $refIds)); |
|
| 122 | 122 | |
| 123 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
| 123 | + $list = array_merge($list, $manager->searchItems($search)); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | return $list; |
@@ -134,17 +134,17 @@ discard block |
||
| 134 | 134 | * @param array $include List of resource types that should be fetched |
| 135 | 135 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 136 | 136 | */ |
| 137 | - protected function getListItems( array $items, array $include ) |
|
| 137 | + protected function getListItems(array $items, array $include) |
|
| 138 | 138 | { |
| 139 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'customer/lists' ); |
|
| 139 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'customer/lists'); |
|
| 140 | 140 | |
| 141 | 141 | $search = $manager->createSearch(); |
| 142 | 142 | $expr = array( |
| 143 | - $search->compare( '==', 'customer.lists.parentid', array_keys( $items ) ), |
|
| 144 | - $search->compare( '==', 'customer.lists.domain', $include ), |
|
| 143 | + $search->compare('==', 'customer.lists.parentid', array_keys($items)), |
|
| 144 | + $search->compare('==', 'customer.lists.domain', $include), |
|
| 145 | 145 | ); |
| 146 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 146 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 147 | 147 | |
| 148 | - return $manager->searchItems( $search ); |
|
| 148 | + return $manager->searchItems($search); |
|
| 149 | 149 | } |
| 150 | 150 | } |
@@ -107,20 +107,20 @@ discard block |
||
| 107 | 107 | * @param array $include List of resource types that should be fetched |
| 108 | 108 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Iface |
| 109 | 109 | */ |
| 110 | - protected function getChildItems( array $items, array $include ) |
|
| 110 | + protected function getChildItems(array $items, array $include) |
|
| 111 | 111 | { |
| 112 | 112 | $list = []; |
| 113 | - $refIds = array_keys( $items ); |
|
| 114 | - $include = array_intersect( $include, array( 'supplier/address' ) ); |
|
| 113 | + $refIds = array_keys($items); |
|
| 114 | + $include = array_intersect($include, array('supplier/address')); |
|
| 115 | 115 | |
| 116 | - foreach( $include as $type ) |
|
| 116 | + foreach ($include as $type) |
|
| 117 | 117 | { |
| 118 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), $type ); |
|
| 118 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), $type); |
|
| 119 | 119 | |
| 120 | 120 | $search = $manager->createSearch(); |
| 121 | - $search->setConditions( $search->compare( '==', str_replace( '/', '.', $type ) . '.parentid', $refIds ) ); |
|
| 121 | + $search->setConditions($search->compare('==', str_replace('/', '.', $type) . '.parentid', $refIds)); |
|
| 122 | 122 | |
| 123 | - $list = array_merge( $list, $manager->searchItems( $search ) ); |
|
| 123 | + $list = array_merge($list, $manager->searchItems($search)); |
|
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | return $list; |
@@ -134,17 +134,17 @@ discard block |
||
| 134 | 134 | * @param array $include List of resource types that should be fetched |
| 135 | 135 | * @return array List of items implementing \Aimeos\MShop\Common\Item\Lists\Iface |
| 136 | 136 | */ |
| 137 | - protected function getListItems( array $items, array $include ) |
|
| 137 | + protected function getListItems(array $items, array $include) |
|
| 138 | 138 | { |
| 139 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'supplier/lists' ); |
|
| 139 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'supplier/lists'); |
|
| 140 | 140 | |
| 141 | 141 | $search = $manager->createSearch(); |
| 142 | 142 | $expr = array( |
| 143 | - $search->compare( '==', 'supplier.lists.parentid', array_keys( $items ) ), |
|
| 144 | - $search->compare( '==', 'supplier.lists.domain', $include ), |
|
| 143 | + $search->compare('==', 'supplier.lists.parentid', array_keys($items)), |
|
| 144 | + $search->compare('==', 'supplier.lists.domain', $include), |
|
| 145 | 145 | ); |
| 146 | - $search->setConditions( $search->combine( '&&', $expr ) ); |
|
| 146 | + $search->setConditions($search->combine('&&', $expr)); |
|
| 147 | 147 | |
| 148 | - return $manager->searchItems( $search ); |
|
| 148 | + return $manager->searchItems($search); |
|
| 149 | 149 | } |
| 150 | 150 | } |