@@ -65,15 +65,13 @@ |
||
| 65 | 65 | { |
| 66 | 66 | $options[$name] = (array) $options[$name]; |
| 67 | 67 | $options[$name][] = substr( $option, $pos + 1 ); |
| 68 | - } |
|
| 69 | - else |
|
| 68 | + } else |
|
| 70 | 69 | { |
| 71 | 70 | $options[$name] = substr( $option, $pos + 1 ); |
| 72 | 71 | } |
| 73 | 72 | |
| 74 | 73 | unset( $params[$key] ); |
| 75 | - } |
|
| 76 | - else |
|
| 74 | + } else |
|
| 77 | 75 | { |
| 78 | 76 | printf( "Invalid option \"%1\$s\"\n", $option ); |
| 79 | 77 | usage(); |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param \Aimeos\MShop\Coupon\Item\Iface $couponItem Coupon item with configuration for the provider |
| 34 | 34 | * @param string $code Coupon code entered by the customer |
| 35 | 35 | */ |
| 36 | - public function __construct( \Aimeos\MShop\Coupon\Provider\Iface $provider, |
|
| 36 | + public function __construct( \Aimeos\MShop\Coupon\Provider\Iface $provider, |
|
| 37 | 37 | \Aimeos\MShop\Context\Item\Iface $context, \Aimeos\MShop\Coupon\Item\Iface $couponItem, $code ) |
| 38 | 38 | { |
| 39 | 39 | $this->provider = $provider; |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | { |
| 253 | 253 | $name = $file->getFilename(); |
| 254 | 254 | |
| 255 | - if( $file->isFile() && preg_match('/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) { |
|
| 255 | + if( $file->isFile() && preg_match( '/^[a-z]{2,3}(_[A-Z]{2})?$/', $name ) ) { |
|
| 256 | 256 | $list[$name] = null; |
| 257 | 257 | } |
| 258 | 258 | } |
@@ -32,9 +32,12 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | parent::__construct( $config ); |
| 34 | 34 | |
| 35 | - try { |
|
| 35 | + try |
|
| 36 | + { |
|
| 36 | 37 | $this->conn = $this->createConnection(); |
| 37 | - } catch( \Aimeos\MW\DB\Exception $e ) { |
|
| 38 | + } |
|
| 39 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
| 40 | + { |
|
| 38 | 41 | throw new \Aimeos\MW\MQueue\Exception( $e->getMessage() ); |
| 39 | 42 | } |
| 40 | 43 | } |
@@ -85,8 +88,7 @@ discard block |
||
| 85 | 88 | { |
| 86 | 89 | $dsn .= isset( $host ) ? ';host=' . $host : ''; |
| 87 | 90 | $dsn .= isset( $port ) ? ';port=' . $port : ''; |
| 88 | - } |
|
| 89 | - else |
|
| 91 | + } else |
|
| 90 | 92 | { |
| 91 | 93 | $dsn .= ';unix_socket=' . $sock; |
| 92 | 94 | } |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct( \Aimeos\MW\DB\Connection\Iface $conn, $queue, $sql, $rtime ) |
| 38 | 38 | { |
| 39 | - $this->cname = md5( microtime(true) . getmypid() ); |
|
| 39 | + $this->cname = md5( microtime( true ) . getmypid() ); |
|
| 40 | 40 | $this->conn = $conn; |
| 41 | 41 | $this->queue = $queue; |
| 42 | 42 | $this->sql = $sql; |
@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | |
| 9 | 9 | return array( |
| 10 | 10 | 'table' => array( |
| 11 | - 'madmin_cache' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 11 | + 'madmin_cache' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 12 | 12 | |
| 13 | 13 | $table = $schema->createTable( 'madmin_cache' ); |
| 14 | 14 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | return $schema; |
| 24 | 24 | }, |
| 25 | 25 | |
| 26 | - 'madmin_cache_tag' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 26 | + 'madmin_cache_tag' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 27 | 27 | |
| 28 | 28 | $table = $schema->createTable( 'madmin_cache_tag' ); |
| 29 | 29 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | return array( |
| 10 | 10 | 'table' => array( |
| 11 | 11 | |
| 12 | - 'mshop_catalog' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 12 | + 'mshop_catalog' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 13 | 13 | |
| 14 | 14 | $table = $schema->createTable( 'mshop_catalog' ); |
| 15 | 15 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $schema; |
| 36 | 36 | }, |
| 37 | 37 | |
| 38 | - 'mshop_catalog_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 38 | + 'mshop_catalog_list_type' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 39 | 39 | |
| 40 | 40 | $table = $schema->createTable( 'mshop_catalog_list_type' ); |
| 41 | 41 | |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | return $schema; |
| 59 | 59 | }, |
| 60 | 60 | |
| 61 | - 'mshop_catalog_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 61 | + 'mshop_catalog_list' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 62 | 62 | |
| 63 | 63 | $table = $schema->createTable( 'mshop_catalog_list' ); |
| 64 | 64 | |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | return array( |
| 10 | 10 | 'table' => array( |
| 11 | - 'madmin_log' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 11 | + 'madmin_log' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 12 | 12 | |
| 13 | 13 | $table = $schema->createTable( 'madmin_log' ); |
| 14 | 14 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | return array( |
| 10 | 10 | 'table' => array( |
| 11 | 11 | |
| 12 | - 'mshop_coupon' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 12 | + 'mshop_coupon' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 13 | 13 | |
| 14 | 14 | $table = $schema->createTable( 'mshop_coupon' ); |
| 15 | 15 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $schema; |
| 36 | 36 | }, |
| 37 | 37 | |
| 38 | - 'mshop_coupon_code' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 38 | + 'mshop_coupon_code' => function( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
| 39 | 39 | |
| 40 | 40 | $table = $schema->createTable( 'mshop_coupon_code' ); |
| 41 | 41 | |