@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | parent::__construct( $mimetype ); |
| 42 | 42 | |
| 43 | 43 | if( ( $this->image = @imagecreatefromstring( $content ) ) === false ) { |
| 44 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.') ); |
|
| 44 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'The image type isn\'t supported by GDlib.' ) ); |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | if( ( $this->info = getimagesizefromstring( $content ) ) === false ) { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if( imagealphablending( $this->image, false ) === false ) { |
| 52 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') ); |
|
| 52 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) ); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $this->options = $options; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | case 'image/png': |
| 116 | 116 | |
| 117 | 117 | if( imagesavealpha( $this->image, true ) === false ) { |
| 118 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)') ); |
|
| 118 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagesavealpha)' ) ); |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | if( @imagepng( $this->image, $filename, (int) 10 - $quality / 10 ) === false ) { |
@@ -198,15 +198,15 @@ discard block |
||
| 198 | 198 | try |
| 199 | 199 | { |
| 200 | 200 | if( imagealphablending( $newImage, false ) === false ) { |
| 201 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)') ); |
|
| 201 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagealphablending)' ) ); |
|
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | if( ( $transparent = imagecolorallocatealpha( $newImage, 255, 255, 255, 127 ) ) === false ) { |
| 205 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)') ); |
|
| 205 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagecolorallocatealpha)' ) ); |
|
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | if( imagefilledrectangle( $newImage, 0, 0, $destWidth, $destHeight, $transparent ) === false ) { |
| 209 | - throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)') ); |
|
| 209 | + throw new \Aimeos\MW\Media\Exception( sprintf( 'GD library failed (imagefilledrectangle)' ) ); |
|
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | if( imagecopyresampled( $newImage, $image, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight ) === false ) { |
@@ -166,8 +166,7 @@ |
||
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | $this->image = $result; |
| 169 | - } |
|
| 170 | - else |
|
| 169 | + } else |
|
| 171 | 170 | { |
| 172 | 171 | $this->image = $this->resample( $this->image, $this->info[0], $this->info[1], $width, $height ); |
| 173 | 172 | } |
@@ -96,7 +96,7 @@ |
||
| 96 | 96 | $this->object->addHelper( 'translate', $this->translate ); |
| 97 | 97 | |
| 98 | 98 | $ds = DIRECTORY_SEPARATOR; |
| 99 | - $filenames = array( 'notexisting', __DIR__ . $ds . '_testfiles'. $ds . 'template.php' ); |
|
| 99 | + $filenames = array( 'notexisting', __DIR__.$ds.'_testfiles'.$ds.'template.php' ); |
|
| 100 | 100 | |
| 101 | 101 | |
| 102 | 102 | $this->object->assign( array( 'quantity' => 1 ) ); |
@@ -1,2 +1,2 @@ |
||
| 1 | 1 | <?php $quantity = ( isset( $this->quantity ) ? $this->quantity : 0 ); ?> |
| 2 | -Number of files: <?php echo $quantity . ' ' . $this->translate( 'test', 'File', 'Files', $quantity ); |
|
| 2 | +Number of files: <?php echo $quantity.' '.$this->translate( 'test', 'File', 'Files', $quantity ); |
|
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | * Returns the search results for the given SQL statement. |
| 606 | 606 | * |
| 607 | 607 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
| 608 | - * @param $sql SQL statement |
|
| 608 | + * @param string $sql SQL statement |
|
| 609 | 609 | * @return \Aimeos\MW\DB\Result\Iface Search result object |
| 610 | 610 | */ |
| 611 | 611 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | * Returns the total number of items found for the conditions |
| 636 | 636 | * |
| 637 | 637 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
| 638 | - * @param array $find List of markers that should be replaced in the SQL statement |
|
| 638 | + * @param string[] $find List of markers that should be replaced in the SQL statement |
|
| 639 | 639 | * @param array $replace List of replacements for the markers in the SQL statement |
| 640 | 640 | * @throws \Aimeos\MShop\Locale\Exception If no total value was found |
| 641 | 641 | * @return integer Total number of found items |
@@ -104,9 +104,12 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | public function createItem() |
| 106 | 106 | { |
| 107 | - try { |
|
| 107 | + try |
|
| 108 | + { |
|
| 108 | 109 | $values = array( 'locale.language.siteid' => $this->getContext()->getLocale()->getSiteId() ); |
| 109 | - } catch( \Exception $ex ) { |
|
| 110 | + } |
|
| 111 | + catch( \Exception $ex ) |
|
| 112 | + { |
|
| 110 | 113 | $values = array( 'locale.language.siteid' => null ); |
| 111 | 114 | } |
| 112 | 115 | |
@@ -173,8 +176,7 @@ discard block |
||
| 173 | 176 | * @see mshop/locale/manager/language/standard/count/ansi |
| 174 | 177 | */ |
| 175 | 178 | $path = 'mshop/locale/manager/language/standard/insert'; |
| 176 | - } |
|
| 177 | - else |
|
| 179 | + } else |
|
| 178 | 180 | { |
| 179 | 181 | /** mshop/locale/manager/language/standard/update/mysql |
| 180 | 182 | * Updates an existing language record in the database |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | * @see mshop/locale/manager/language/decorators/global |
| 464 | 464 | */ |
| 465 | 465 | |
| 466 | - return $this->getSubManagerBase( 'locale', 'language/' . $manager, $name ); |
|
| 466 | + return $this->getSubManagerBase( 'locale', 'language/'.$manager, $name ); |
|
| 467 | 467 | } |
| 468 | 468 | |
| 469 | 469 | |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | $replace = array( |
| 511 | 511 | $search->getConditionString( $types, $translations ), |
| 512 | 512 | $search->getSortationString( $types, $translations ), |
| 513 | - ( $columns ? ', ' . $columns : '' ), |
|
| 513 | + ( $columns ? ', '.$columns : '' ), |
|
| 514 | 514 | $search->getSliceStart(), |
| 515 | 515 | $search->getSliceSize(), |
| 516 | 516 | ); |
@@ -632,7 +632,7 @@ discard block |
||
| 632 | 632 | $statement = $conn->create( $sql ); |
| 633 | 633 | $level = \Aimeos\MW\Logger\Base::DEBUG; |
| 634 | 634 | |
| 635 | - $this->getContext()->getLogger()->log( __METHOD__ . ': SQL statement: ' . $statement, $level, 'core/sql' ); |
|
| 635 | + $this->getContext()->getLogger()->log( __METHOD__.': SQL statement: '.$statement, $level, 'core/sql' ); |
|
| 636 | 636 | |
| 637 | 637 | $results = $statement->execute(); |
| 638 | 638 | |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | * Returns the search results for the given SQL statement. |
| 606 | 606 | * |
| 607 | 607 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
| 608 | - * @param $sql SQL statement |
|
| 608 | + * @param string $sql SQL statement |
|
| 609 | 609 | * @return \Aimeos\MW\DB\Result\Iface Search result object |
| 610 | 610 | */ |
| 611 | 611 | protected function getSearchResults( \Aimeos\MW\DB\Connection\Iface $conn, $sql ) |
@@ -635,7 +635,7 @@ discard block |
||
| 635 | 635 | * Returns the total number of items found for the conditions |
| 636 | 636 | * |
| 637 | 637 | * @param \Aimeos\MW\DB\Connection\Iface $conn Database connection |
| 638 | - * @param array $find List of markers that should be replaced in the SQL statement |
|
| 638 | + * @param string[] $find List of markers that should be replaced in the SQL statement |
|
| 639 | 639 | * @param array $replace List of replacements for the markers in the SQL statement |
| 640 | 640 | * @throws \Aimeos\MShop\Locale\Exception If no total value was found |
| 641 | 641 | * @return integer Total number of found items |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | * @see mshop/locale/manager/site/decorators/global |
| 530 | 530 | */ |
| 531 | 531 | |
| 532 | - return $this->getSubManagerBase( 'locale', 'site/' . $manager, $name ); |
|
| 532 | + return $this->getSubManagerBase( 'locale', 'site/'.$manager, $name ); |
|
| 533 | 533 | } |
| 534 | 534 | |
| 535 | 535 | |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | $replace = array( |
| 562 | 562 | $search->getConditionString( $types, $translations ), |
| 563 | 563 | $search->getSortationString( $types, $translations ), |
| 564 | - ( $columns ? ', ' . $columns : '' ), |
|
| 564 | + ( $columns ? ', '.$columns : '' ), |
|
| 565 | 565 | $search->getSliceStart(), |
| 566 | 566 | $search->getSliceSize(), |
| 567 | 567 | ); |
@@ -898,7 +898,7 @@ discard block |
||
| 898 | 898 | $statement = $conn->create( $sql ); |
| 899 | 899 | $level = \Aimeos\MW\Logger\Base::DEBUG; |
| 900 | 900 | |
| 901 | - $this->getContext()->getLogger()->log( __METHOD__ . ': SQL statement: ' . $statement, $level, 'core/sql' ); |
|
| 901 | + $this->getContext()->getLogger()->log( __METHOD__.': SQL statement: '.$statement, $level, 'core/sql' ); |
|
| 902 | 902 | |
| 903 | 903 | $results = $statement->execute(); |
| 904 | 904 | |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | $this->assertEquals( null, $columnItem->getDefaultValue() ); |
| 93 | 93 | $this->assertTrue( $columnItem->isNullable() ); |
| 94 | 94 | |
| 95 | - $this->setExpectedException('\\Aimeos\\MW\\Setup\\Exception'); |
|
| 95 | + $this->setExpectedException( '\\Aimeos\\MW\\Setup\\Exception' ); |
|
| 96 | 96 | $this->object->getColumnDetails( 'mw_setup_dbschema_test', 'notexisting' ); |
| 97 | 97 | } |
| 98 | 98 | |
@@ -31,15 +31,15 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $l = new TestListener(); |
| 33 | 33 | |
| 34 | - $this->object->addListener($l, 'test'); |
|
| 34 | + $this->object->addListener( $l, 'test' ); |
|
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function testRemoveListener() |
| 38 | 38 | { |
| 39 | 39 | $l = new TestListener(); |
| 40 | 40 | |
| 41 | - $this->object->addListener($l, 'test'); |
|
| 42 | - $this->object->removeListener($l, 'test'); |
|
| 41 | + $this->object->addListener( $l, 'test' ); |
|
| 42 | + $this->object->removeListener( $l, 'test' ); |
|
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public function testclearListeners() |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | public function testnotifyListeners() |
| 51 | 51 | { |
| 52 | 52 | $l = new TestListener(); |
| 53 | - $this->object->addListener($l, 'test'); |
|
| 54 | - $this->object->addListener($l, 'testagain'); |
|
| 53 | + $this->object->addListener( $l, 'test' ); |
|
| 54 | + $this->object->addListener( $l, 'testagain' ); |
|
| 55 | 55 | |
| 56 | - $this->object->notifyListenersPublic('test', 'warn'); |
|
| 57 | - $this->object->notifyListenersPublic('testagain', 'warn'); |
|
| 56 | + $this->object->notifyListenersPublic( 'test', 'warn' ); |
|
| 57 | + $this->object->notifyListenersPublic( 'testagain', 'warn' ); |
|
| 58 | 58 | } |
| 59 | 59 | } |
| 60 | 60 | |
@@ -65,9 +65,9 @@ discard block |
||
| 65 | 65 | * @param string $action |
| 66 | 66 | * @param string|null $value |
| 67 | 67 | */ |
| 68 | - public function notifyListenersPublic($action, $value = null) |
|
| 68 | + public function notifyListenersPublic( $action, $value = null ) |
|
| 69 | 69 | { |
| 70 | - $this->notifyListeners($action, $value); |
|
| 70 | + $this->notifyListeners( $action, $value ); |
|
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | public function clearListenersPublic() |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | public function update( \Aimeos\MW\Observer\Publisher\Iface $p, $action, $value = null ) |
| 87 | 87 | { |
| 88 | - if ($action == 'test') { |
|
| 88 | + if( $action == 'test' ) { |
|
| 89 | 89 | return false; |
| 90 | 90 | } |
| 91 | 91 | } |
@@ -58,13 +58,13 @@ |
||
| 58 | 58 | $this->assertEquals( 'error', $msg[4] ); |
| 59 | 59 | |
| 60 | 60 | |
| 61 | - $this->setExpectedException('\\Aimeos\\MW\\Logger\\Exception'); |
|
| 62 | - $this->object->log( 'wrong log level', -1); |
|
| 61 | + $this->setExpectedException( '\\Aimeos\\MW\\Logger\\Exception' ); |
|
| 62 | + $this->object->log( 'wrong log level', -1 ); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function testScalarLog() |
| 66 | 66 | { |
| 67 | - $this->object->log( array ( 'scalar', 'errortest' ) ); |
|
| 67 | + $this->object->log( array( 'scalar', 'errortest' ) ); |
|
| 68 | 68 | |
| 69 | 69 | if( !file_exists( $this->filename ) ) { |
| 70 | 70 | throw new \RuntimeException( 'No test file found' ); |
@@ -266,10 +266,13 @@ |
||
| 266 | 266 | |
| 267 | 267 | $conn = $this->object->acquire(); |
| 268 | 268 | |
| 269 | - try { |
|
| 269 | + try |
|
| 270 | + { |
|
| 270 | 271 | $stmt = $conn->create( $sqlinsert ); |
| 271 | 272 | $stmt->execute(); |
| 272 | - } catch ( \Aimeos\MW\DB\Exception $de ) { |
|
| 273 | + } |
|
| 274 | + catch ( \Aimeos\MW\DB\Exception $de ) |
|
| 275 | + { |
|
| 273 | 276 | $this->object->release( $conn ); |
| 274 | 277 | return; |
| 275 | 278 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | $conn = $this->object->acquire(); |
| 208 | 208 | |
| 209 | 209 | $value = "(\\')"; |
| 210 | - $sqlinsert = str_replace( ':value', '\'' . $conn->escape( $value ) . '\'', $sqlinsert ); |
|
| 210 | + $sqlinsert = str_replace( ':value', '\''.$conn->escape( $value ).'\'', $sqlinsert ); |
|
| 211 | 211 | $stmt = $conn->create( $sqlinsert ); |
| 212 | 212 | $stmt->execute()->finish(); |
| 213 | 213 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | { |
| 222 | 222 | $conn = $this->object->acquire(); |
| 223 | 223 | |
| 224 | - $sqlinsert = 'INSERT INTO "mw_unit_test" ("name") VALUES (\'' . $conn->escape( '\'\'' ) . '\')'; |
|
| 224 | + $sqlinsert = 'INSERT INTO "mw_unit_test" ("name") VALUES (\''.$conn->escape( '\'\'' ).'\')'; |
|
| 225 | 225 | |
| 226 | 226 | $stmt = $conn->create( $sqlinsert ); |
| 227 | 227 | $stmt->execute()->finish(); |
@@ -248,12 +248,12 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | public function testStmtSimpleBindTwo() |
| 250 | 250 | { |
| 251 | - $sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)'; |
|
| 251 | + $sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)'; |
|
| 252 | 252 | |
| 253 | 253 | $conn = $this->object->acquire(); |
| 254 | 254 | |
| 255 | 255 | $stmt2 = $conn->create( $sqlinsert2 ); |
| 256 | - $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT); |
|
| 256 | + $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
|
| 257 | 257 | $stmt2->bind( 2, 0.12 ); |
| 258 | 258 | $stmt2->execute()->finish(); |
| 259 | 259 | |
@@ -265,12 +265,12 @@ discard block |
||
| 265 | 265 | |
| 266 | 266 | public function testStmtSimpleBindThree() |
| 267 | 267 | { |
| 268 | - $sqlinsert3 = 'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)'; |
|
| 268 | + $sqlinsert3 = 'INSERT INTO "mw_unit_test" ("name", "id") VALUES (\'?te?st?\', ?)'; |
|
| 269 | 269 | |
| 270 | 270 | $conn = $this->object->acquire(); |
| 271 | 271 | |
| 272 | 272 | $stmt2 = $conn->create( $sqlinsert3 ); |
| 273 | - $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT); |
|
| 273 | + $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
|
| 274 | 274 | $stmt2->execute()->finish(); |
| 275 | 275 | |
| 276 | 276 | $this->object->release( $conn ); |
@@ -281,15 +281,15 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | public function testStmtSimpleInvalidBindParamType() |
| 283 | 283 | { |
| 284 | - $sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)'; |
|
| 284 | + $sqlinsert2 = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)'; |
|
| 285 | 285 | |
| 286 | 286 | $conn = $this->object->acquire(); |
| 287 | 287 | |
| 288 | 288 | try |
| 289 | 289 | { |
| 290 | 290 | $stmt2 = $conn->create( $sqlinsert2 ); |
| 291 | - $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT); |
|
| 292 | - $stmt2->bind( 2, 0.15, 123); |
|
| 291 | + $stmt2->bind( 1, 1, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
|
| 292 | + $stmt2->bind( 2, 0.15, 123 ); |
|
| 293 | 293 | $stmt2->execute(); |
| 294 | 294 | } |
| 295 | 295 | catch( \Aimeos\MW\DB\Exception $de ) |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | } |
| 300 | 300 | |
| 301 | 301 | $this->object->release( $conn ); |
| 302 | - $this->fail('An expected exception has not been raised'); |
|
| 302 | + $this->fail( 'An expected exception has not been raised' ); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | |
@@ -312,13 +312,13 @@ discard block |
||
| 312 | 312 | try { |
| 313 | 313 | $stmt = $conn->create( $sqlinsert ); |
| 314 | 314 | $stmt->execute(); |
| 315 | - } catch ( \Aimeos\MW\DB\Exception $de ) { |
|
| 315 | + } catch( \Aimeos\MW\DB\Exception $de ) { |
|
| 316 | 316 | $this->object->release( $conn ); |
| 317 | 317 | return; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | 320 | $this->object->release( $conn ); |
| 321 | - $this->fail('An expected exception has not been raised'); |
|
| 321 | + $this->fail( 'An expected exception has not been raised' ); |
|
| 322 | 322 | } |
| 323 | 323 | |
| 324 | 324 | |
@@ -421,7 +421,7 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | public function testWrongFieldType() |
| 423 | 423 | { |
| 424 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 424 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 425 | 425 | $sqlinsert = 'INSERT INTO "mw_unit_test" ("id", "name") VALUES (?, ?)'; |
| 426 | 426 | |
| 427 | 427 | $conn = $this->object->acquire(); |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | $stmt->bind( 2, 'test', 123 ); |
| 434 | 434 | $stmt->execute(); |
| 435 | 435 | } |
| 436 | - catch ( \Aimeos\MW\DB\Exception $e ) |
|
| 436 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
| 437 | 437 | { |
| 438 | 438 | $this->object->release( $conn ); |
| 439 | 439 | throw $e; |
@@ -457,13 +457,13 @@ discard block |
||
| 457 | 457 | |
| 458 | 458 | $conn = $this->object->acquire(); |
| 459 | 459 | |
| 460 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 460 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 461 | 461 | |
| 462 | 462 | try |
| 463 | 463 | { |
| 464 | 464 | $conn->create( $sql )->execute()->finish(); |
| 465 | 465 | } |
| 466 | - catch ( \Aimeos\MW\DB\Exception $e ) |
|
| 466 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
| 467 | 467 | { |
| 468 | 468 | $this->object->release( $conn ); |
| 469 | 469 | throw $e; |
@@ -475,13 +475,13 @@ discard block |
||
| 475 | 475 | { |
| 476 | 476 | $conn = $this->object->acquire(); |
| 477 | 477 | |
| 478 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 478 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 479 | 479 | |
| 480 | 480 | try |
| 481 | 481 | { |
| 482 | 482 | $conn->create( 'SELECT *' )->execute()->finish(); |
| 483 | 483 | } |
| 484 | - catch ( \Aimeos\MW\DB\Exception $e ) |
|
| 484 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
| 485 | 485 | { |
| 486 | 486 | $this->object->release( $conn ); |
| 487 | 487 | throw $e; |
@@ -495,13 +495,13 @@ discard block |
||
| 495 | 495 | |
| 496 | 496 | $conn = $this->object->acquire(); |
| 497 | 497 | |
| 498 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 498 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 499 | 499 | |
| 500 | 500 | try |
| 501 | 501 | { |
| 502 | 502 | $conn->create( $sql, 123 ); |
| 503 | 503 | } |
| 504 | - catch (\Aimeos\MW\DB\Exception $e) |
|
| 504 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
| 505 | 505 | { |
| 506 | 506 | $this->object->release( $conn ); |
| 507 | 507 | throw $e; |
@@ -513,20 +513,20 @@ discard block |
||
| 513 | 513 | { |
| 514 | 514 | $mock = $this->getMockBuilder( '\Aimeos\MW\DB\Connection\Iface' )->getMock(); |
| 515 | 515 | |
| 516 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 516 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 517 | 517 | $this->object->release( $mock ); |
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | |
| 521 | 521 | public function testDBFactory() |
| 522 | 522 | { |
| 523 | - $this->assertInstanceOf('\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object); |
|
| 523 | + $this->assertInstanceOf( '\\Aimeos\\MW\\DB\\Manager\\Iface', $this->object ); |
|
| 524 | 524 | } |
| 525 | 525 | |
| 526 | 526 | |
| 527 | 527 | public function testFactoryFail() |
| 528 | 528 | { |
| 529 | - $this->setExpectedException('\\Aimeos\\MW\\DB\\Exception'); |
|
| 529 | + $this->setExpectedException( '\\Aimeos\\MW\\DB\\Exception' ); |
|
| 530 | 530 | \Aimeos\MW\DB\Factory::createManager( \TestHelperMw::getConfig(), 'notDefined' ); |
| 531 | 531 | } |
| 532 | 532 | } |