@@ -76,8 +76,7 @@ |
||
76 | 76 | $this->release( $conn ); |
77 | 77 | |
78 | 78 | $this->status( 'done' ); |
79 | - } |
|
80 | - else |
|
79 | + } else |
|
81 | 80 | { |
82 | 81 | $this->status( 'OK' ); |
83 | 82 | } |
@@ -156,9 +156,12 @@ discard block |
||
156 | 156 | */ |
157 | 157 | public function createItem( $type = null, $domain = null ) |
158 | 158 | { |
159 | - try { |
|
159 | + try |
|
160 | + { |
|
160 | 161 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
161 | - } catch( \Exception $e ) { |
|
162 | + } |
|
163 | + catch( \Exception $e ) |
|
164 | + { |
|
162 | 165 | $siteid = null; |
163 | 166 | } |
164 | 167 | |
@@ -186,9 +189,12 @@ discard block |
||
186 | 189 | |
187 | 190 | $context = $this->getContext(); |
188 | 191 | |
189 | - try { |
|
192 | + try |
|
193 | + { |
|
190 | 194 | $siteid = $context->getLocale()->getSiteId(); |
191 | - } catch( \Exception $e ) { |
|
195 | + } |
|
196 | + catch( \Exception $e ) |
|
197 | + { |
|
192 | 198 | $siteid = null; |
193 | 199 | } |
194 | 200 | |
@@ -238,8 +244,7 @@ discard block |
||
238 | 244 | * @see madmin/log/manager/standard/count/ansi |
239 | 245 | */ |
240 | 246 | $path = 'madmin/log/manager/standard/insert'; |
241 | - } |
|
242 | - else |
|
247 | + } else |
|
243 | 248 | { |
244 | 249 | /** madmin/log/manager/standard/update/mysql |
245 | 250 | * Updates an existing log record in the database |
@@ -217,9 +217,12 @@ discard block |
||
217 | 217 | ); |
218 | 218 | $dbm = $context->getDatabaseManager(); |
219 | 219 | |
220 | - try { |
|
220 | + try |
|
221 | + { |
|
221 | 222 | $this->object = \Aimeos\MW\Cache\Factory::createManager( $name, $config, $dbm ); |
222 | - } catch( \Exception $e ) { |
|
223 | + } |
|
224 | + catch( \Exception $e ) |
|
225 | + { |
|
223 | 226 | $this->object = \Aimeos\MW\Cache\Factory::createManager( 'DB', $config, $dbm ); |
224 | 227 | } |
225 | 228 | } |
@@ -289,9 +292,12 @@ discard block |
||
289 | 292 | */ |
290 | 293 | public function createItem( $type = null, $domain = null ) |
291 | 294 | { |
292 | - try { |
|
295 | + try |
|
296 | + { |
|
293 | 297 | $values = array( 'siteid' => $this->getContext()->getLocale()->getSiteId() ); |
294 | - } catch( \Exception $e ) { |
|
298 | + } |
|
299 | + catch( \Exception $e ) |
|
300 | + { |
|
295 | 301 | $values = array( 'siteid' => null ); |
296 | 302 | } |
297 | 303 |
@@ -29,8 +29,8 @@ |
||
29 | 29 | |
30 | 30 | protected function setUp() |
31 | 31 | { |
32 | - $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value']); |
|
33 | - $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2']); |
|
32 | + $this->propItem = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['languageid' => 'de', 'c.type' => 'test', 'c.value' => 'value'] ); |
|
33 | + $this->propItem2 = new \Aimeos\MShop\Common\Item\Property\Standard( 'c.', ['languageid' => 'de', 'c.languageid' => 'en', 'c.type' => 'test2'] ); |
|
34 | 34 | |
35 | 35 | $this->object = new TraitsClass(); |
36 | 36 | $this->object->setPropertyItems( [$this->propItem, $this->propItem2] ); |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public static function checkClass( $name, $object ) |
31 | 31 | { |
32 | - if( ($object instanceof $name) === false ) { |
|
32 | + if( ( $object instanceof $name ) === false ) { |
|
33 | 33 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Object doesn\'t implement "%1$s"', $name ) ); |
34 | 34 | } |
35 | 35 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | foreach( $list as $object ) |
48 | 48 | { |
49 | - if( ($object instanceof $name) === false ) { |
|
49 | + if( ( $object instanceof $name ) === false ) { |
|
50 | 50 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Object doesn\'t implement "%1$s"', $name ) ); |
51 | 51 | } |
52 | 52 | } |
@@ -59,9 +59,12 @@ |
||
59 | 59 | */ |
60 | 60 | public function execute() |
61 | 61 | { |
62 | - try { |
|
62 | + try |
|
63 | + { |
|
63 | 64 | $stmt = $this->exec(); |
64 | - } catch( \PDOException $e ) { |
|
65 | + } |
|
66 | + catch( \PDOException $e ) |
|
67 | + { |
|
65 | 68 | throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo ); |
66 | 69 | } |
67 | 70 |
@@ -58,9 +58,12 @@ |
||
58 | 58 | */ |
59 | 59 | public function execute() |
60 | 60 | { |
61 | - try { |
|
61 | + try |
|
62 | + { |
|
62 | 63 | $stmt = $this->exec(); |
63 | - } catch( \PDOException $e ) { |
|
64 | + } |
|
65 | + catch( \PDOException $e ) |
|
66 | + { |
|
64 | 67 | throw new \Aimeos\MW\DB\Exception( $e->getMessage(), $e->getCode() ); |
65 | 68 | } |
66 | 69 |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | foreach( $attributes as $key => $item ) |
70 | 70 | { |
71 | 71 | if( $item instanceof $iface ) { |
72 | - $list[ $item->getCode() ] = $item->getFunction(); |
|
72 | + $list[$item->getCode()] = $item->getFunction(); |
|
73 | 73 | } else if( isset( $item['code'] ) ) { |
74 | - $list[ $item['code'] ] = $item['function']; |
|
74 | + $list[$item['code']] = $item['function']; |
|
75 | 75 | } else { |
76 | 76 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
77 | 77 | } |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | foreach( $attributes as $key => $item ) |
98 | 98 | { |
99 | 99 | if( $item instanceof $iface ) { |
100 | - $translations[ $item->getCode() ] = $item->getInternalCode(); |
|
100 | + $translations[$item->getCode()] = $item->getInternalCode(); |
|
101 | 101 | } else if( isset( $item['code'] ) ) { |
102 | - $translations[ $item['code'] ] = $item['internalcode']; |
|
102 | + $translations[$item['code']] = $item['internalcode']; |
|
103 | 103 | } else { |
104 | 104 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
105 | 105 | } |
@@ -125,9 +125,9 @@ discard block |
||
125 | 125 | foreach( $attributes as $key => $item ) |
126 | 126 | { |
127 | 127 | if( $item instanceof $iface ) { |
128 | - $types[ $item->getCode() ] = $item->getInternalType(); |
|
128 | + $types[$item->getCode()] = $item->getInternalType(); |
|
129 | 129 | } else if( isset( $item['code'] ) ) { |
130 | - $types[ $item['code'] ] = $item['internaltype']; |
|
130 | + $types[$item['code']] = $item['internaltype']; |
|
131 | 131 | } else { |
132 | 132 | throw new \Aimeos\MW\Common\Exception( sprintf( 'Invalid attribute at position "%1$d"', $key ) ); |
133 | 133 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'function' => $func, |
33 | 33 | ); |
34 | 34 | |
35 | - $this->object = new \Aimeos\MW\Criteria\Attribute\Standard($values); |
|
35 | + $this->object = new \Aimeos\MW\Criteria\Attribute\Standard( $values ); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | public function testGetInternalDeps() |
70 | 70 | { |
71 | - $this->assertEquals(array( 'test' ), $this->object->getInternalDeps()); |
|
71 | + $this->assertEquals( array( 'test' ), $this->object->getInternalDeps() ); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 |
@@ -17,7 +17,9 @@ |
||
17 | 17 | |
18 | 18 | protected function setUp() |
19 | 19 | { |
20 | - $func = function() {}; |
|
20 | + $func = function() |
|
21 | + { |
|
22 | +}; |
|
21 | 23 | |
22 | 24 | $values = array( |
23 | 25 | 'type' => 'attribute_type', |