@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public function getLanguageId() |
49 | 49 | { |
50 | - if( isset( $this->values[$this->prefix . 'languageid'] ) ) { |
|
51 | - return (string) $this->values[$this->prefix . 'languageid']; |
|
50 | + if( isset( $this->values[$this->prefix.'languageid'] ) ) { |
|
51 | + return (string) $this->values[$this->prefix.'languageid']; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | return null; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | if( $id !== $this->getLanguageId() ) |
67 | 67 | { |
68 | - $this->values[$this->prefix . 'languageid'] = $this->checkLanguageId( $id ); |
|
68 | + $this->values[$this->prefix.'languageid'] = $this->checkLanguageId( $id ); |
|
69 | 69 | $this->setModified(); |
70 | 70 | } |
71 | 71 | |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function getParentId() |
82 | 82 | { |
83 | - if( isset( $this->values[$this->prefix . 'parentid'] ) ) { |
|
84 | - return (string) $this->values[$this->prefix . 'parentid']; |
|
83 | + if( isset( $this->values[$this->prefix.'parentid'] ) ) { |
|
84 | + return (string) $this->values[$this->prefix.'parentid']; |
|
85 | 85 | } |
86 | 86 | } |
87 | 87 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | { |
97 | 97 | if( (string) $id !== $this->getParentId() ) |
98 | 98 | { |
99 | - $this->values[$this->prefix . 'parentid'] = (string) $id; |
|
99 | + $this->values[$this->prefix.'parentid'] = (string) $id; |
|
100 | 100 | $this->setModified(); |
101 | 101 | } |
102 | 102 | |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function getType() |
113 | 113 | { |
114 | - if( isset( $this->values[$this->prefix . 'type'] ) ) { |
|
115 | - return (string) $this->values[$this->prefix . 'type']; |
|
114 | + if( isset( $this->values[$this->prefix.'type'] ) ) { |
|
115 | + return (string) $this->values[$this->prefix.'type']; |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | */ |
125 | 125 | public function getTypeName() |
126 | 126 | { |
127 | - if( isset( $this->values[$this->prefix . 'typename'] ) ) { |
|
128 | - return (string) $this->values[$this->prefix . 'typename']; |
|
127 | + if( isset( $this->values[$this->prefix.'typename'] ) ) { |
|
128 | + return (string) $this->values[$this->prefix.'typename']; |
|
129 | 129 | } |
130 | 130 | } |
131 | 131 | |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | */ |
138 | 138 | public function getTypeId() |
139 | 139 | { |
140 | - if( isset( $this->values[$this->prefix . 'typeid'] ) ) { |
|
141 | - return (string) $this->values[$this->prefix . 'typeid']; |
|
140 | + if( isset( $this->values[$this->prefix.'typeid'] ) ) { |
|
141 | + return (string) $this->values[$this->prefix.'typeid']; |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -153,7 +153,7 @@ discard block |
||
153 | 153 | { |
154 | 154 | if( (string) $id !== $this->getTypeId() ) |
155 | 155 | { |
156 | - $this->values[$this->prefix . 'typeid'] = (string) $id; |
|
156 | + $this->values[$this->prefix.'typeid'] = (string) $id; |
|
157 | 157 | $this->setModified(); |
158 | 158 | } |
159 | 159 | |
@@ -168,8 +168,8 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function getValue() |
170 | 170 | { |
171 | - if( isset( $this->values[$this->prefix . 'value'] ) ) { |
|
172 | - return (string) $this->values[$this->prefix . 'value']; |
|
171 | + if( isset( $this->values[$this->prefix.'value'] ) ) { |
|
172 | + return (string) $this->values[$this->prefix.'value']; |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | return ''; |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | { |
187 | 187 | if( (string) $value !== $this->getValue() ) |
188 | 188 | { |
189 | - $this->values[$this->prefix . 'value'] = (string) $value; |
|
189 | + $this->values[$this->prefix.'value'] = (string) $value; |
|
190 | 190 | $this->setModified(); |
191 | 191 | } |
192 | 192 | |
@@ -215,16 +215,16 @@ discard block |
||
215 | 215 | { |
216 | 216 | $unknown = []; |
217 | 217 | $list = parent::fromArray( $list ); |
218 | - unset( $list[$this->prefix . 'type'], $list[$this->prefix . 'typename'] ); |
|
218 | + unset( $list[$this->prefix.'type'], $list[$this->prefix.'typename'] ); |
|
219 | 219 | |
220 | 220 | foreach( $list as $key => $value ) |
221 | 221 | { |
222 | 222 | switch( $key ) |
223 | 223 | { |
224 | - case $this->prefix . 'parentid': $this->setParentId( $value ); break; |
|
225 | - case $this->prefix . 'typeid': $this->setTypeId( $value ); break; |
|
226 | - case $this->prefix . 'languageid': $this->setLanguageId( $value ); break; |
|
227 | - case $this->prefix . 'value': $this->setValue( $value ); break; |
|
224 | + case $this->prefix.'parentid': $this->setParentId( $value ); break; |
|
225 | + case $this->prefix.'typeid': $this->setTypeId( $value ); break; |
|
226 | + case $this->prefix.'languageid': $this->setLanguageId( $value ); break; |
|
227 | + case $this->prefix.'value': $this->setValue( $value ); break; |
|
228 | 228 | default: $unknown[$key] = $value; |
229 | 229 | } |
230 | 230 | } |
@@ -243,15 +243,15 @@ discard block |
||
243 | 243 | { |
244 | 244 | $list = parent::toArray( $private ); |
245 | 245 | |
246 | - $list[$this->prefix . 'typename'] = $this->getTypeName(); |
|
247 | - $list[$this->prefix . 'languageid'] = $this->getLanguageId(); |
|
248 | - $list[$this->prefix . 'value'] = $this->getValue(); |
|
249 | - $list[$this->prefix . 'type'] = $this->getType(); |
|
246 | + $list[$this->prefix.'typename'] = $this->getTypeName(); |
|
247 | + $list[$this->prefix.'languageid'] = $this->getLanguageId(); |
|
248 | + $list[$this->prefix.'value'] = $this->getValue(); |
|
249 | + $list[$this->prefix.'type'] = $this->getType(); |
|
250 | 250 | |
251 | 251 | if( $private === true ) |
252 | 252 | { |
253 | - $list[$this->prefix . 'parentid'] = $this->getParentId(); |
|
254 | - $list[$this->prefix . 'typeid'] = $this->getTypeId(); |
|
253 | + $list[$this->prefix.'parentid'] = $this->getParentId(); |
|
254 | + $list[$this->prefix.'typeid'] = $this->getTypeId(); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | return $list; |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | */ |
58 | 58 | public function createItem() |
59 | 59 | { |
60 | - $values = array( $this->prefix . 'siteid' => $this->getContext()->getLocale()->getSiteId() ); |
|
60 | + $values = array( $this->prefix.'siteid' => $this->getContext()->getLocale()->getSiteId() ); |
|
61 | 61 | return $this->createItemBase( $values ); |
62 | 62 | } |
63 | 63 | |
@@ -77,8 +77,8 @@ discard block |
||
77 | 77 | $langid = $this->getContext()->getLocale()->getLanguageId(); |
78 | 78 | |
79 | 79 | $expr = array( |
80 | - $object->compare( '==', $this->prefix . 'languageid', null ), |
|
81 | - $object->compare( '==', $this->prefix . 'languageid', $langid ), |
|
80 | + $object->compare( '==', $this->prefix.'languageid', null ), |
|
81 | + $object->compare( '==', $this->prefix.'languageid', $langid ), |
|
82 | 82 | ); |
83 | 83 | |
84 | 84 | $object->setConditions( $object->combine( '||', $expr ) ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $type = 'update'; |
123 | 123 | } |
124 | 124 | |
125 | - $stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath() . $type ) ); |
|
125 | + $stmt = $conn->create( $this->getSqlConfig( $this->getConfigPath().$type ) ); |
|
126 | 126 | |
127 | 127 | $stmt->bind( 1, $item->getParentId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
128 | 128 | $stmt->bind( 2, $item->getTypeId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | if( $fetch === true ) |
145 | 145 | { |
146 | 146 | if( $id === null ) { |
147 | - $item->setId( $this->newId( $conn, $this->getConfigPath() . 'newid' ) ); |
|
147 | + $item->setId( $this->newId( $conn, $this->getConfigPath().'newid' ) ); |
|
148 | 148 | } else { |
149 | 149 | $item->setId( $id ); // modified false |
150 | 150 | } |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | */ |
170 | 170 | public function deleteItems( array $ids ) |
171 | 171 | { |
172 | - $this->deleteItemsBase( $ids, $this->getConfigPath() . 'delete' ); |
|
172 | + $this->deleteItemsBase( $ids, $this->getConfigPath().'delete' ); |
|
173 | 173 | } |
174 | 174 | |
175 | 175 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | */ |
185 | 185 | public function getItem( $id, array $ref = [], $default = false ) |
186 | 186 | { |
187 | - return $this->getItemBase( $this->prefix . 'id', $id, $ref, $default ); |
|
187 | + return $this->getItemBase( $this->prefix.'id', $id, $ref, $default ); |
|
188 | 188 | } |
189 | 189 | |
190 | 190 | |
@@ -214,15 +214,15 @@ discard block |
||
214 | 214 | } |
215 | 215 | |
216 | 216 | $level = \Aimeos\MShop\Locale\Manager\Base::SITE_ALL; |
217 | - $cfgPathSearch = $this->getConfigPath() . 'search'; |
|
218 | - $cfgPathCount = $this->getConfigPath() . 'count'; |
|
217 | + $cfgPathSearch = $this->getConfigPath().'search'; |
|
218 | + $cfgPathCount = $this->getConfigPath().'count'; |
|
219 | 219 | $required = array( trim( $this->prefix, '.' ) ); |
220 | 220 | |
221 | 221 | $results = $this->searchItemsBase( $conn, $search, $cfgPathSearch, $cfgPathCount, $required, $total, $level ); |
222 | 222 | while( ( $row = $results->fetch() ) !== false ) |
223 | 223 | { |
224 | - $map[ $row[$this->prefix . 'id'] ] = $row; |
|
225 | - $typeIds[ $row[$this->prefix . 'typeid'] ] = null; |
|
224 | + $map[$row[$this->prefix.'id']] = $row; |
|
225 | + $typeIds[$row[$this->prefix.'typeid']] = null; |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | $dbm->release( $conn, $dbname ); |
@@ -237,16 +237,16 @@ discard block |
||
237 | 237 | { |
238 | 238 | $typeManager = $this->getObject()->getSubManager( 'type' ); |
239 | 239 | $typeSearch = $typeManager->createSearch(); |
240 | - $typeSearch->setConditions( $typeSearch->compare( '==', $this->prefix . 'type.id', array_keys( $typeIds ) ) ); |
|
240 | + $typeSearch->setConditions( $typeSearch->compare( '==', $this->prefix.'type.id', array_keys( $typeIds ) ) ); |
|
241 | 241 | $typeSearch->setSlice( 0, $search->getSliceSize() ); |
242 | 242 | $typeItems = $typeManager->searchItems( $typeSearch ); |
243 | 243 | |
244 | 244 | foreach( $map as $id => $row ) |
245 | 245 | { |
246 | - if( isset( $typeItems[ $row[$this->prefix . 'typeid'] ] ) ) |
|
246 | + if( isset( $typeItems[$row[$this->prefix.'typeid']] ) ) |
|
247 | 247 | { |
248 | - $row[$this->prefix . 'type'] = $typeItems[ $row[$this->prefix . 'typeid'] ]->getCode(); |
|
249 | - $row[$this->prefix . 'typename'] = $typeItems[ $row[$this->prefix . 'typeid'] ]->getName(); |
|
248 | + $row[$this->prefix.'type'] = $typeItems[$row[$this->prefix.'typeid']]->getCode(); |
|
249 | + $row[$this->prefix.'typename'] = $typeItems[$row[$this->prefix.'typeid']]->getName(); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | $items[$id] = $this->createItemBase( $row ); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | */ |
268 | 268 | public function getSubManager( $manager, $name = null ) |
269 | 269 | { |
270 | - return $this->getSubManagerBase( 'common', 'property/' . $manager, $name ); |
|
270 | + return $this->getSubManagerBase( 'common', 'property/'.$manager, $name ); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 |
@@ -288,7 +288,7 @@ |
||
288 | 288 | * @see mshop/product/manager/property/decorators/global |
289 | 289 | */ |
290 | 290 | |
291 | - return $this->getSubManagerBase( 'product', 'property/' . $manager, $name ); |
|
291 | + return $this->getSubManagerBase( 'product', 'property/'.$manager, $name ); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 |
@@ -288,7 +288,7 @@ |
||
288 | 288 | * @see mshop/attribute/manager/property/decorators/global |
289 | 289 | */ |
290 | 290 | |
291 | - return $this->getSubManagerBase( 'attribute', 'property/' . $manager, $name ); |
|
291 | + return $this->getSubManagerBase( 'attribute', 'property/'.$manager, $name ); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 |
@@ -284,7 +284,7 @@ |
||
284 | 284 | * @see mshop/attribute/manager/property/type/decorators/global |
285 | 285 | */ |
286 | 286 | |
287 | - return $this->getSubManagerBase( 'attribute', 'property/type/' . $manager, $name ); |
|
287 | + return $this->getSubManagerBase( 'attribute', 'property/type/'.$manager, $name ); |
|
288 | 288 | } |
289 | 289 | |
290 | 290 |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | |
9 | 9 | return array( |
10 | 10 | 'table' => array( |
11 | - 'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
11 | + 'mshop_attribute_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
12 | 12 | |
13 | 13 | $table = $schema->createTable( 'mshop_attribute_type' ); |
14 | 14 | |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return $schema; |
32 | 32 | }, |
33 | 33 | |
34 | - 'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
34 | + 'mshop_attribute' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
35 | 35 | |
36 | 36 | $table = $schema->createTable( 'mshop_attribute' ); |
37 | 37 | |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | $table->addColumn( 'status', 'smallint', [] ); |
46 | 46 | $table->addColumn( 'mtime', 'datetime', [] ); |
47 | 47 | $table->addColumn( 'ctime', 'datetime', [] ); |
48 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
48 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
49 | 49 | |
50 | 50 | $table->setPrimaryKey( array( 'id' ), 'pk_msatt_id' ); |
51 | 51 | $table->addUniqueIndex( array( 'siteid', 'domain', 'code', 'typeid' ), 'unq_msattr_sid_dom_cod_tid' ); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | return $schema; |
60 | 60 | }, |
61 | 61 | |
62 | - 'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
62 | + 'mshop_attribute_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
63 | 63 | |
64 | 64 | $table = $schema->createTable( 'mshop_attribute_list_type' ); |
65 | 65 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | return $schema; |
83 | 83 | }, |
84 | 84 | |
85 | - 'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
85 | + 'mshop_attribute_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
86 | 86 | |
87 | 87 | $table = $schema->createTable( 'mshop_attribute_list' ); |
88 | 88 | |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | return $schema; |
121 | 121 | }, |
122 | 122 | |
123 | - 'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
123 | + 'mshop_attribute_property_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
124 | 124 | |
125 | 125 | $table = $schema->createTable( 'mshop_attribute_property_type' ); |
126 | 126 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | return $schema; |
144 | 144 | }, |
145 | 145 | |
146 | - 'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
146 | + 'mshop_attribute_property' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
147 | 147 | |
148 | 148 | $table = $schema->createTable( 'mshop_attribute_property' ); |
149 | 149 |
@@ -8,7 +8,8 @@ discard block |
||
8 | 8 | |
9 | 9 | return array( |
10 | 10 | 'table' => array( |
11 | - 'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
11 | + 'mshop_attribute_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
12 | + { |
|
12 | 13 | |
13 | 14 | $table = $schema->createTable( 'mshop_attribute_type' ); |
14 | 15 | |
@@ -31,7 +32,8 @@ discard block |
||
31 | 32 | return $schema; |
32 | 33 | }, |
33 | 34 | |
34 | - 'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
35 | + 'mshop_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
36 | + { |
|
35 | 37 | |
36 | 38 | $table = $schema->createTable( 'mshop_attribute' ); |
37 | 39 | |
@@ -59,7 +61,8 @@ discard block |
||
59 | 61 | return $schema; |
60 | 62 | }, |
61 | 63 | |
62 | - 'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
64 | + 'mshop_attribute_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
65 | + { |
|
63 | 66 | |
64 | 67 | $table = $schema->createTable( 'mshop_attribute_list_type' ); |
65 | 68 | |
@@ -82,7 +85,8 @@ discard block |
||
82 | 85 | return $schema; |
83 | 86 | }, |
84 | 87 | |
85 | - 'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
88 | + 'mshop_attribute_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
89 | + { |
|
86 | 90 | |
87 | 91 | $table = $schema->createTable( 'mshop_attribute_list' ); |
88 | 92 | |
@@ -120,7 +124,8 @@ discard block |
||
120 | 124 | return $schema; |
121 | 125 | }, |
122 | 126 | |
123 | - 'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
127 | + 'mshop_attribute_property_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
128 | + { |
|
124 | 129 | |
125 | 130 | $table = $schema->createTable( 'mshop_attribute_property_type' ); |
126 | 131 | |
@@ -143,7 +148,8 @@ discard block |
||
143 | 148 | return $schema; |
144 | 149 | }, |
145 | 150 | |
146 | - 'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
151 | + 'mshop_attribute_property' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
152 | + { |
|
147 | 153 | |
148 | 154 | $table = $schema->createTable( 'mshop_attribute_property' ); |
149 | 155 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->additional->setEditor( 'core:unittest' ); |
52 | 52 | |
53 | 53 | $ds = DIRECTORY_SEPARATOR; |
54 | - $path = __DIR__ . $ds . 'data' . $ds . 'attribute-property.php'; |
|
54 | + $path = __DIR__.$ds.'data'.$ds.'attribute-property.php'; |
|
55 | 55 | |
56 | 56 | if( ( $testdata = include( $path ) ) == false ) { |
57 | 57 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for attribute domain', $path ) ); |
@@ -89,19 +89,19 @@ discard block |
||
89 | 89 | $type->setStatus( $dataset['status'] ); |
90 | 90 | |
91 | 91 | $attributePropertyTypeManager->saveItem( $type ); |
92 | - $typeIds[ $key ] = $type->getId(); |
|
92 | + $typeIds[$key] = $type->getId(); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $prodProperty = $attributePropertyManager->createItem(); |
96 | 96 | foreach( $testdata['attribute/property'] as $key => $dataset ) |
97 | 97 | { |
98 | - if( !isset( $typeIds[ $dataset['typeid'] ] ) ) { |
|
98 | + if( !isset( $typeIds[$dataset['typeid']] ) ) { |
|
99 | 99 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No attribute property type ID found for "%1$s"', $dataset['typeid'] ) ); |
100 | 100 | } |
101 | 101 | |
102 | 102 | $prodProperty->setId( null ); |
103 | - $prodProperty->setParentId( $prodIds[ $dataset['parentid'] ] ); |
|
104 | - $prodProperty->setTypeId( $typeIds[ $dataset['typeid'] ] ); |
|
103 | + $prodProperty->setParentId( $prodIds[$dataset['parentid']] ); |
|
104 | + $prodProperty->setTypeId( $typeIds[$dataset['typeid']] ); |
|
105 | 105 | $prodProperty->setLanguageId( $dataset['langid'] ); |
106 | 106 | $prodProperty->setValue( $dataset['value'] ); |
107 | 107 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $search = $attributeManager->createSearch(); |
125 | 125 | |
126 | 126 | foreach( $attributeManager->searchItems( $search ) as $id => $item ) { |
127 | - $entry[ 'attribute/' . $item->getDomain() . '/' . $item->getType() . '/' . $item->getCode() ] = $id; |
|
127 | + $entry['attribute/'.$item->getDomain().'/'.$item->getType().'/'.$item->getCode()] = $id; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $entry; |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->additional->setEditor( 'core:unittest' ); |
52 | 52 | |
53 | 53 | $ds = DIRECTORY_SEPARATOR; |
54 | - $path = __DIR__ . $ds . 'data' . $ds . 'product-property.php'; |
|
54 | + $path = __DIR__.$ds.'data'.$ds.'product-property.php'; |
|
55 | 55 | |
56 | 56 | if( ( $testdata = include( $path ) ) == false ) { |
57 | 57 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for product domain', $path ) ); |
@@ -89,19 +89,19 @@ discard block |
||
89 | 89 | $type->setStatus( $dataset['status'] ); |
90 | 90 | |
91 | 91 | $productPropertyTypeManager->saveItem( $type ); |
92 | - $typeIds[ $key ] = $type->getId(); |
|
92 | + $typeIds[$key] = $type->getId(); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $prodProperty = $productPropertyManager->createItem(); |
96 | 96 | foreach( $testdata['product/property'] as $key => $dataset ) |
97 | 97 | { |
98 | - if( !isset( $typeIds[ $dataset['typeid'] ] ) ) { |
|
98 | + if( !isset( $typeIds[$dataset['typeid']] ) ) { |
|
99 | 99 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No product property type ID found for "%1$s"', $dataset['typeid'] ) ); |
100 | 100 | } |
101 | 101 | |
102 | 102 | $prodProperty->setId( null ); |
103 | - $prodProperty->setParentId( $prodIds[ $dataset['parentid'] ] ); |
|
104 | - $prodProperty->setTypeId( $typeIds[ $dataset['typeid'] ] ); |
|
103 | + $prodProperty->setParentId( $prodIds[$dataset['parentid']] ); |
|
104 | + $prodProperty->setTypeId( $typeIds[$dataset['typeid']] ); |
|
105 | 105 | $prodProperty->setLanguageId( $dataset['langid'] ); |
106 | 106 | $prodProperty->setValue( $dataset['value'] ); |
107 | 107 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $search = $productManager->createSearch(); |
125 | 125 | |
126 | 126 | foreach( $productManager->searchItems( $search ) as $id => $item ) { |
127 | - $entry[ 'product/' . $item->getCode() ] = $id; |
|
127 | + $entry['product/'.$item->getCode()] = $id; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $entry; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | * @copyright Aimeos (aimeos.org), 2017 |
6 | 6 | */ |
7 | 7 | |
8 | -return array ( |
|
8 | +return array( |
|
9 | 9 | 'attribute/property/type' => array( |
10 | 10 | 'attribute/property/type/size' => array( 'domain' => 'attribute', 'code' => 'size', 'label' => 'Size', 'status' => 1 ), |
11 | 11 | 'attribute/property/type/mtime' => array( 'domain' => 'attribute', 'code' => 'mtime', 'label' => 'Modification time', 'status' => 1 ), |