@@ -96,7 +96,7 @@ |
||
96 | 96 | { |
97 | 97 | if( $value == $this->getCode() ) { return $this; } |
98 | 98 | |
99 | - $this->values['supplier.code'] = (string) $this->checkCode( $value );; |
|
99 | + $this->values['supplier.code'] = (string) $this->checkCode( $value ); ; |
|
100 | 100 | $this->setModified(); |
101 | 101 | |
102 | 102 | return $this; |
@@ -152,7 +152,7 @@ |
||
152 | 152 | * @return self |
153 | 153 | * @throws \InvalidArgumentException for invalid header names or values. |
154 | 154 | */ |
155 | - public function withHeader($name, $value ) |
|
155 | + public function withHeader( $name, $value ) |
|
156 | 156 | { |
157 | 157 | $this->response = $this->response->withHeader( $name, $value ); |
158 | 158 | return $this; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * |
104 | 104 | * @param string $version HTTP protocol version |
105 | 105 | * @return self |
106 | - */ |
|
106 | + */ |
|
107 | 107 | public function withProtocolVersion( $version ) |
108 | 108 | { |
109 | 109 | $this->response = $this->response->withProtocolVersion( $version ); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @return string[][] Returns an associative array of the message's headers. |
118 | 118 | * Each key MUST be a header name, and each value MUST be an array of |
119 | 119 | * strings for that header. |
120 | - */ |
|
120 | + */ |
|
121 | 121 | public function getHeaders() |
122 | 122 | { |
123 | 123 | return $this->response->getHeaders(); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | } |
106 | 106 | } |
107 | 107 | |
108 | - if ($this->checkWeightScale( $this->getWeight( $prodMap ) ) === false) { |
|
108 | + if( $this->checkWeightScale( $this->getWeight( $prodMap ) ) === false ) { |
|
109 | 109 | return false; |
110 | 110 | } |
111 | 111 | |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | $min = $this->getConfigValue( array( 'weight.min' ) ); |
125 | 125 | $max = $this->getConfigValue( array( 'weight.max' ) ); |
126 | 126 | |
127 | - if( $min !== null && ( (float) $min) > $basketWeight ) { |
|
127 | + if( $min !== null && ( (float) $min ) > $basketWeight ) { |
|
128 | 128 | return false; |
129 | 129 | } |
130 | 130 | |
131 | - if( $max !== null && ( (float) $max) < $basketWeight ) { |
|
131 | + if( $max !== null && ( (float) $max ) < $basketWeight ) { |
|
132 | 132 | return false; |
133 | 133 | } |
134 | 134 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $search->setSlice( 0, 0x7fffffff ); // if more than 100 products are in the basket |
175 | 175 | |
176 | 176 | foreach( $propertyManager->searchItems( $search ) as $property ) { |
177 | - $weight += ((float) $property->getValue()) * $prodMap[$prodIds[$property->getParentId()]]; |
|
177 | + $weight += ( (float) $property->getValue() ) * $prodMap[$prodIds[$property->getParentId()]]; |
|
178 | 178 | } |
179 | 179 | |
180 | 180 |
@@ -97,9 +97,11 @@ |
||
97 | 97 | $code = $basketItem->getProductCode(); |
98 | 98 | $prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty ); |
99 | 99 | |
100 | - foreach( $basketItem->getProducts() as $prodItem ) // calculate bundled products |
|
100 | + foreach( $basketItem->getProducts() as $prodItem ) { |
|
101 | + // calculate bundled products |
|
101 | 102 | { |
102 | 103 | $qty = $prodItem->getQuantity(); |
104 | + } |
|
103 | 105 | $code = $prodItem->getProductCode(); |
104 | 106 | $prodMap[$code] = ( isset( $prodMap[$code] ) ? $prodMap[$code] + $qty : $qty ); |
105 | 107 | } |
@@ -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 | } |
@@ -80,15 +80,15 @@ |
||
80 | 80 | $sock = $this->getConfig( 'db/socket' ); |
81 | 81 | $dbase = $this->getConfig( 'db/database', 'aimeos' ); |
82 | 82 | |
83 | - $dsn = $adapter . ':dbname=' . $dbase; |
|
83 | + $dsn = $adapter.':dbname='.$dbase; |
|
84 | 84 | if( $sock == null ) |
85 | 85 | { |
86 | - $dsn .= isset( $host ) ? ';host=' . $host : ''; |
|
87 | - $dsn .= isset( $port ) ? ';port=' . $port : ''; |
|
86 | + $dsn .= isset( $host ) ? ';host='.$host : ''; |
|
87 | + $dsn .= isset( $port ) ? ';port='.$port : ''; |
|
88 | 88 | } |
89 | 89 | else |
90 | 90 | { |
91 | - $dsn .= ';unix_socket=' . $sock; |
|
91 | + $dsn .= ';unix_socket='.$sock; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | $attr = array( |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $this->additional->setEditor( 'core:unittest' ); |
61 | 61 | |
62 | 62 | $ds = DIRECTORY_SEPARATOR; |
63 | - $path = __DIR__ . $ds . 'data' . $ds . 'attribute.php'; |
|
63 | + $path = __DIR__.$ds.'data'.$ds.'attribute.php'; |
|
64 | 64 | |
65 | 65 | if( ( $testdata = include( $path ) ) == false ) { |
66 | 66 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for attribute domain', $path ) ); |
@@ -67,7 +67,7 @@ |
||
67 | 67 | if( $this->additional->getConfig()->get( 'setup/site' ) === 'unittest' ) |
68 | 68 | { |
69 | 69 | $ds = DIRECTORY_SEPARATOR; |
70 | - $filename = __DIR__ . $ds . 'data' . $ds . 'locale.php'; |
|
70 | + $filename = __DIR__.$ds.'data'.$ds.'locale.php'; |
|
71 | 71 | |
72 | 72 | if( ( $testdata = include( $filename ) ) == false ) { |
73 | 73 | throw new \Aimeos\MW\Setup\Exception( sprintf( 'No data file "%1$s" found', $filename ) ); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $this->additional->setEditor( 'core:unittest' ); |
61 | 61 | |
62 | 62 | $ds = DIRECTORY_SEPARATOR; |
63 | - $path = __DIR__ . $ds . 'data' . $ds . 'text.php'; |
|
63 | + $path = __DIR__.$ds.'data'.$ds.'text.php'; |
|
64 | 64 | |
65 | 65 | if( ( $testdata = include( $path ) ) == false ) { |
66 | 66 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for text domain', $path ) ); |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $this->additional->setEditor( 'core:unittest' ); |
61 | 61 | |
62 | 62 | $ds = DIRECTORY_SEPARATOR; |
63 | - $path = __DIR__ . $ds . 'data' . $ds . 'media.php'; |
|
63 | + $path = __DIR__.$ds.'data'.$ds.'media.php'; |
|
64 | 64 | |
65 | 65 | if( ( $testdata = include( $path ) ) == false ) { |
66 | 66 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for media domain', $path ) ); |
@@ -75,7 +75,7 @@ |
||
75 | 75 | $adminLogManager = \Aimeos\MAdmin\Log\Manager\Factory::createManager( $this->additional, 'Standard' ); |
76 | 76 | |
77 | 77 | $ds = DIRECTORY_SEPARATOR; |
78 | - $path = __DIR__ . $ds . 'data' . $ds . 'log.php'; |
|
78 | + $path = __DIR__.$ds.'data'.$ds.'log.php'; |
|
79 | 79 | |
80 | 80 | if( ( $testdata = include( $path ) ) == false ) { |
81 | 81 | throw new \Aimeos\MShop\Exception( sprintf( 'No file "%1$s" found for log domain', $path ) ); |