@@ -172,8 +172,7 @@ |
||
172 | 172 | { |
173 | 173 | $this->executeList( $stmtList ); |
174 | 174 | $this->status( 'migrated' ); |
175 | - } |
|
176 | - else |
|
175 | + } else |
|
177 | 176 | { |
178 | 177 | $this->status( 'OK' ); |
179 | 178 | } |
@@ -81,8 +81,7 @@ |
||
81 | 81 | } else { |
82 | 82 | $this->status( 'OK' ); |
83 | 83 | } |
84 | - } |
|
85 | - else |
|
84 | + } else |
|
86 | 85 | { |
87 | 86 | $this->status( 'OK' ); |
88 | 87 | } |
@@ -14,7 +14,8 @@ discard block |
||
14 | 14 | |
15 | 15 | |
16 | 16 | 'table' => array( |
17 | - 'mshop_text_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
17 | + 'mshop_text_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
18 | + { |
|
18 | 19 | |
19 | 20 | $table = $schema->createTable( 'mshop_text_type' ); |
20 | 21 | |
@@ -37,7 +38,8 @@ discard block |
||
37 | 38 | return $schema; |
38 | 39 | }, |
39 | 40 | |
40 | - 'mshop_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
41 | + 'mshop_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
42 | + { |
|
41 | 43 | |
42 | 44 | $table = $schema->createTable( 'mshop_text' ); |
43 | 45 | |
@@ -65,7 +67,8 @@ discard block |
||
65 | 67 | return $schema; |
66 | 68 | }, |
67 | 69 | |
68 | - 'mshop_text_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
70 | + 'mshop_text_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
71 | + { |
|
69 | 72 | |
70 | 73 | $table = $schema->createTable( 'mshop_text_list_type' ); |
71 | 74 | |
@@ -88,7 +91,8 @@ discard block |
||
88 | 91 | return $schema; |
89 | 92 | }, |
90 | 93 | |
91 | - 'mshop_text_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
94 | + 'mshop_text_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
95 | + { |
|
92 | 96 | |
93 | 97 | $table = $schema->createTable( 'mshop_text_list' ); |
94 | 98 |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | |
16 | 16 | 'table' => array( |
17 | - 'mshop_text_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
17 | + 'mshop_text_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
18 | 18 | |
19 | 19 | $table = $schema->createTable( 'mshop_text_type' ); |
20 | 20 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return $schema; |
38 | 38 | }, |
39 | 39 | |
40 | - 'mshop_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
40 | + 'mshop_text' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
41 | 41 | |
42 | 42 | $table = $schema->createTable( 'mshop_text' ); |
43 | 43 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $table->addColumn( 'status', 'smallint', [] ); |
52 | 52 | $table->addColumn( 'mtime', 'datetime', [] ); |
53 | 53 | $table->addColumn( 'ctime', 'datetime', [] ); |
54 | - $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
54 | + $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
55 | 55 | |
56 | 56 | $table->setPrimaryKey( array( 'id' ), 'pk_mstex_id' ); |
57 | 57 | $table->addIndex( array( 'siteid', 'domain', 'status' ), 'idx_mstex_sid_domain_status' ); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | return $schema; |
66 | 66 | }, |
67 | 67 | |
68 | - 'mshop_text_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
68 | + 'mshop_text_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
69 | 69 | |
70 | 70 | $table = $schema->createTable( 'mshop_text_list_type' ); |
71 | 71 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | return $schema; |
89 | 89 | }, |
90 | 90 | |
91 | - 'mshop_text_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
91 | + 'mshop_text_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
92 | 92 | |
93 | 93 | $table = $schema->createTable( 'mshop_text_list' ); |
94 | 94 |
@@ -16,7 +16,8 @@ discard block |
||
16 | 16 | |
17 | 17 | 'table' => array( |
18 | 18 | |
19 | - 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
19 | + 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
20 | + { |
|
20 | 21 | |
21 | 22 | $table = $schema->createTable( 'mshop_index_attribute' ); |
22 | 23 | |
@@ -37,7 +38,8 @@ discard block |
||
37 | 38 | return $schema; |
38 | 39 | }, |
39 | 40 | |
40 | - 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
41 | + 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
42 | + { |
|
41 | 43 | |
42 | 44 | $table = $schema->createTable( 'mshop_index_catalog' ); |
43 | 45 | |
@@ -56,7 +58,8 @@ discard block |
||
56 | 58 | return $schema; |
57 | 59 | }, |
58 | 60 | |
59 | - 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
61 | + 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
62 | + { |
|
60 | 63 | |
61 | 64 | $table = $schema->createTable( 'mshop_index_price' ); |
62 | 65 | |
@@ -82,7 +85,8 @@ discard block |
||
82 | 85 | return $schema; |
83 | 86 | }, |
84 | 87 | |
85 | - 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
88 | + 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) |
|
89 | + { |
|
86 | 90 | |
87 | 91 | $table = $schema->createTable( 'mshop_index_text' ); |
88 | 92 | $table->addOption( 'engine', 'MyISAM' ); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | |
17 | 17 | 'table' => array( |
18 | 18 | |
19 | - 'mshop_index_attribute' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
19 | + 'mshop_index_attribute' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
20 | 20 | |
21 | 21 | $table = $schema->createTable( 'mshop_index_attribute' ); |
22 | 22 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | return $schema; |
38 | 38 | }, |
39 | 39 | |
40 | - 'mshop_index_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
40 | + 'mshop_index_catalog' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
41 | 41 | |
42 | 42 | $table = $schema->createTable( 'mshop_index_catalog' ); |
43 | 43 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return $schema; |
57 | 57 | }, |
58 | 58 | |
59 | - 'mshop_index_price' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
59 | + 'mshop_index_price' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
60 | 60 | |
61 | 61 | $table = $schema->createTable( 'mshop_index_price' ); |
62 | 62 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | return $schema; |
83 | 83 | }, |
84 | 84 | |
85 | - 'mshop_index_text' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
85 | + 'mshop_index_text' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
86 | 86 | |
87 | 87 | $table = $schema->createTable( 'mshop_index_text' ); |
88 | 88 | $table->addOption( 'engine', 'MyISAM' ); |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $table->addColumn( 'listtype', 'string', array( 'length' => 32 ) ); |
94 | 94 | $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
95 | 95 | $table->addColumn( 'type', 'string', array( 'length' => 32 ) ); |
96 | - $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
96 | + $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
97 | 97 | $table->addColumn( 'value', 'text', array( 'length' => 0xffff ) ); |
98 | 98 | $table->addColumn( 'mtime', 'datetime', [] ); |
99 | 99 | $table->addColumn( 'ctime', 'datetime', [] ); |
@@ -227,7 +227,7 @@ |
||
227 | 227 | throw new \RuntimeException( 'Unable to destroy image' ); |
228 | 228 | } |
229 | 229 | |
230 | - return 'data:' . $mime . ';base64,' . base64_encode( $image ); |
|
230 | + return 'data:'.$mime.';base64,'.base64_encode( $image ); |
|
231 | 231 | } |
232 | 232 | |
233 | 233 |
@@ -76,8 +76,7 @@ |
||
76 | 76 | { |
77 | 77 | $this->executeList( $stmtList ); |
78 | 78 | $this->status( 'renamed' ); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | $this->status( 'OK' ); |
83 | 82 | } |
@@ -165,7 +165,7 @@ |
||
165 | 165 | foreach( $bundleItems as $bundleItem ) |
166 | 166 | { |
167 | 167 | foreach( $bundleItem->getRefItems( 'product', null, 'default' ) as $item ) { |
168 | - $bundleMap[ $item->getCode() ][] = $bundleItem->getCode(); |
|
168 | + $bundleMap[$item->getCode()][] = $bundleItem->getCode(); |
|
169 | 169 | } |
170 | 170 | } |
171 | 171 |
@@ -333,7 +333,8 @@ |
||
333 | 333 | { |
334 | 334 | $stockManager->increase( $item->getProductCode(), $item->getStockType(), $how * $item->getQuantity() ); |
335 | 335 | |
336 | - switch( $item->getType() ) { |
|
336 | + switch( $item->getType() ) |
|
337 | + { |
|
337 | 338 | case 'default': |
338 | 339 | $this->updateStockBundle( $item->getProductId(), $item->getStockType() ); break; |
339 | 340 | case 'select': |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | $basedir = __DIR__; |
37 | 37 | } |
38 | 38 | |
39 | - if( $defaultdir === true && is_dir( $basedir . DIRECTORY_SEPARATOR . 'ext' ) === true ) { |
|
40 | - $extdirs[] = realpath( $basedir . DIRECTORY_SEPARATOR . 'ext' ); |
|
39 | + if( $defaultdir === true && is_dir( $basedir.DIRECTORY_SEPARATOR.'ext' ) === true ) { |
|
40 | + $extdirs[] = realpath( $basedir.DIRECTORY_SEPARATOR.'ext' ); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | $this->manifests[$basedir] = $this->getManifestFile( $basedir ); |
@@ -58,15 +58,15 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public static function autoload( $className ) |
60 | 60 | { |
61 | - $fileName = strtr( ltrim( $className, '\\' ), '\\_', DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR ) . '.php'; |
|
61 | + $fileName = strtr( ltrim( $className, '\\' ), '\\_', DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR ).'.php'; |
|
62 | 62 | |
63 | - if( strncmp( $fileName, 'Aimeos' . DIRECTORY_SEPARATOR, 7 ) === 0 ) { |
|
63 | + if( strncmp( $fileName, 'Aimeos'.DIRECTORY_SEPARATOR, 7 ) === 0 ) { |
|
64 | 64 | $fileName = substr( $fileName, 7 ); |
65 | 65 | } |
66 | 66 | |
67 | 67 | foreach( self::$includePaths as $path ) |
68 | 68 | { |
69 | - $file = $path . DIRECTORY_SEPARATOR . $fileName; |
|
69 | + $file = $path.DIRECTORY_SEPARATOR.$fileName; |
|
70 | 70 | |
71 | 71 | if( file_exists( $file ) === true && ( include_once $file ) !== false ) { |
72 | 72 | return true; |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | foreach( explode( PATH_SEPARATOR, get_include_path() ) as $path ) |
77 | 77 | { |
78 | - $file = $path . DIRECTORY_SEPARATOR . $fileName; |
|
78 | + $file = $path.DIRECTORY_SEPARATOR.$fileName; |
|
79 | 79 | |
80 | 80 | if( file_exists( $file ) === true && ( include_once $file ) !== false ) { |
81 | 81 | return true; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | foreach( $manifest['i18n'] as $domain => $location ) { |
105 | - $paths[$domain][] = $basePath . DIRECTORY_SEPARATOR . $location; |
|
105 | + $paths[$domain][] = $basePath.DIRECTORY_SEPARATOR.$location; |
|
106 | 106 | } |
107 | 107 | } |
108 | 108 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | } |
127 | 127 | |
128 | 128 | foreach( $manifest['include'] as $paths ) { |
129 | - $includes[] = $path . DIRECTORY_SEPARATOR . $paths; |
|
129 | + $includes[] = $path.DIRECTORY_SEPARATOR.$paths; |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | foreach( (array) $manifest['config'] as $relpath ) { |
153 | - $confpaths[] = $path . DIRECTORY_SEPARATOR . $relpath; |
|
153 | + $confpaths[] = $path.DIRECTORY_SEPARATOR.$relpath; |
|
154 | 154 | } |
155 | 155 | } |
156 | 156 | |
@@ -197,9 +197,9 @@ discard block |
||
197 | 197 | |
198 | 198 | foreach( $manifest['setup'] as $relpath ) |
199 | 199 | { |
200 | - $setupPaths[] = $path . DIRECTORY_SEPARATOR . $relpath; |
|
200 | + $setupPaths[] = $path.DIRECTORY_SEPARATOR.$relpath; |
|
201 | 201 | |
202 | - $sitePath = $path . DIRECTORY_SEPARATOR . $relpath . DIRECTORY_SEPARATOR . $site; |
|
202 | + $sitePath = $path.DIRECTORY_SEPARATOR.$relpath.DIRECTORY_SEPARATOR.$site; |
|
203 | 203 | |
204 | 204 | if( is_dir( realpath( $sitePath ) ) ) { |
205 | 205 | $setupPaths[] = $sitePath; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | { |
232 | 232 | $name = $file->getFilename(); |
233 | 233 | |
234 | - if( $file->isFile() && preg_match('/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) { |
|
234 | + if( $file->isFile() && preg_match( '/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) { |
|
235 | 235 | $list[$name] = null; |
236 | 236 | } |
237 | 237 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | */ |
292 | 292 | protected function getManifestFile( $dir ) |
293 | 293 | { |
294 | - $manifestFile = $dir . DIRECTORY_SEPARATOR . 'manifest.php'; |
|
294 | + $manifestFile = $dir.DIRECTORY_SEPARATOR.'manifest.php'; |
|
295 | 295 | |
296 | 296 | if( is_dir( $dir ) && file_exists( $manifestFile ) ) { |
297 | 297 | return include $manifestFile; |
@@ -314,8 +314,8 @@ discard block |
||
314 | 314 | |
315 | 315 | $ds = DIRECTORY_SEPARATOR; |
316 | 316 | |
317 | - if( is_file( __DIR__ . $ds . 'vendor' . $ds . 'autoload.php' ) ) { |
|
318 | - require __DIR__ . $ds . 'vendor' . $ds . 'autoload.php'; |
|
317 | + if( is_file( __DIR__.$ds.'vendor'.$ds.'autoload.php' ) ) { |
|
318 | + require __DIR__.$ds.'vendor'.$ds.'autoload.php'; |
|
319 | 319 | } |
320 | 320 | } |
321 | 321 |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->object->setConditions( $this->object->combine( '&&', $expr ) ); |
121 | 121 | $this->assertEquals( "( int_col = 1 AND ( str_col = 'test' ) )", $this->object->getConditionString( $types, $translations ) ); |
122 | 122 | |
123 | - $types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL); |
|
123 | + $types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL ); |
|
124 | 124 | $this->object->setConditions( $this->object->compare( '==', 'column', 1 ) ); |
125 | 125 | $this->assertEquals( "column = 1", $this->object->getConditionString( $types ) ); |
126 | 126 | } |
@@ -131,14 +131,14 @@ discard block |
||
131 | 131 | $types = array( 'int_column' => \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
132 | 132 | |
133 | 133 | $this->object->setConditions( $this->object->compare( '==', 'icol', 10 ) ); |
134 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
134 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
135 | 135 | $this->object->getConditionString( $types ); |
136 | 136 | } |
137 | 137 | |
138 | 138 | |
139 | 139 | public function testGetConditionStringInvalidOperator() |
140 | 140 | { |
141 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
141 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
142 | 142 | $this->object->setConditions( $this->object->compare( '?', 'int_column', 10 ) ); |
143 | 143 | } |
144 | 144 | |
@@ -172,14 +172,14 @@ discard block |
||
172 | 172 | $translations = array( 'asc_column' => 'asc_int_col' ); |
173 | 173 | |
174 | 174 | $this->object->setSortations( array( $this->object->sort( '+', 'asc_col' ) ) ); |
175 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
175 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
176 | 176 | $this->object->getSortationString( $types, $translations ); |
177 | 177 | } |
178 | 178 | |
179 | 179 | |
180 | 180 | public function testGetSortationStringInvalidDirection() |
181 | 181 | { |
182 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
182 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
183 | 183 | $this->object->setSortations( array( $this->object->sort( '/', 'asc_column' ) ) ); |
184 | 184 | } |
185 | 185 | |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | { |
189 | 189 | $types = array( 'asc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_INT, 'desc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_STR ); |
190 | 190 | |
191 | - $this->assertEquals('asc_column ASC', $this->object->getSortationString( $types ) ); |
|
191 | + $this->assertEquals( 'asc_column ASC', $this->object->getSortationString( $types ) ); |
|
192 | 192 | |
193 | 193 | $translations = array( 'asc_column' => 'asc_int_col', 'desc_column' => 'desc_str_col' ); |
194 | - $this->assertEquals('asc_int_col ASC', $this->object->getSortationString( $types, $translations )); |
|
194 | + $this->assertEquals( 'asc_int_col ASC', $this->object->getSortationString( $types, $translations ) ); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 |