@@ -77,10 +77,10 @@ discard block |
||
77 | 77 | 'undefined' => '$undefined', |
78 | 78 | ); |
79 | 79 | |
80 | - $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'listitem', array('a', 'b', 'c') ); |
|
80 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'listitem', array( 'a', 'b', 'c' ) ); |
|
81 | 81 | $this->assertEquals( "( \$listitem == 'a' || \$listitem == 'b' || \$listitem == 'c' )", $expr->toString( $types, $translations ) ); |
82 | 82 | |
83 | - $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '!=', 'listitem', array('a', 'b') ); |
|
83 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '!=', 'listitem', array( 'a', 'b' ) ); |
|
84 | 84 | $this->assertEquals( "( \$listitem != 'a' && \$listitem != 'b' )", $expr->toString( $types, $translations ) ); |
85 | 85 | |
86 | 86 | $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'stringvar', 'value' ); |
@@ -89,16 +89,16 @@ discard block |
||
89 | 89 | $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '<', 'floatvar', 0.1 ); |
90 | 90 | $this->assertEquals( '$floatvar < 0.1', $expr->toString( $types, $translations ) ); |
91 | 91 | |
92 | - $expr= new \Aimeos\MW\Criteria\Expression\Compare\PHP( '>', 'intvar', 10 ); |
|
92 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '>', 'intvar', 10 ); |
|
93 | 93 | $this->assertEquals( '$intvar > 10', $expr->toString( $types, $translations ) ); |
94 | 94 | |
95 | - $expr= new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'boolvar', true ); |
|
95 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'boolvar', true ); |
|
96 | 96 | $this->assertEquals( '$boolvar == 1', $expr->toString( $types, $translations ) ); |
97 | 97 | |
98 | - $expr= new \Aimeos\MW\Criteria\Expression\Compare\PHP( '!=', 'undefined', null ); |
|
98 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '!=', 'undefined', null ); |
|
99 | 99 | $this->assertEquals( '$undefined !== null', $expr->toString( $types, $translations ) ); |
100 | 100 | |
101 | - $expr= new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'undefined', null ); |
|
101 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '==', 'undefined', null ); |
|
102 | 102 | $this->assertEquals( '$undefined === null', $expr->toString( $types, $translations ) ); |
103 | 103 | |
104 | 104 | |
@@ -124,8 +124,8 @@ discard block |
||
124 | 124 | 'undefined' => '$undefined', |
125 | 125 | ); |
126 | 126 | |
127 | - $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '>=', 'listitem', array('a', 'b') ); |
|
128 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
127 | + $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '>=', 'listitem', array( 'a', 'b' ) ); |
|
128 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
129 | 129 | $expr->toString( $types, $translations ); |
130 | 130 | } |
131 | 131 | |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | ); |
151 | 151 | |
152 | 152 | $expr = new \Aimeos\MW\Criteria\Expression\Compare\PHP( '>=', 'undefined', null ); |
153 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
153 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
154 | 154 | $expr->toString( $types, $translations ); |
155 | 155 | } |
156 | 156 | |
157 | 157 | public function testToStringExcept3() |
158 | 158 | { |
159 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
160 | - new \Aimeos\MW\Criteria\Expression\Compare\PHP('=', 'undefined', null); |
|
159 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
160 | + new \Aimeos\MW\Criteria\Expression\Compare\PHP( '=', 'undefined', null ); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | public function testToStringFunction() |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | |
82 | 82 | public function testException1() |
83 | 83 | { |
84 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
84 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
85 | 85 | new \Aimeos\MW\Criteria\Expression\Sort\PHP( '/', 'test(1,2)' ); |
86 | 86 | } |
87 | 87 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | $object = new \Aimeos\MW\Criteria\Expression\Sort\PHP( '+', 'wrongType' ); |
100 | 100 | |
101 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
101 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
102 | 102 | $object->toString( $types, $translations ); |
103 | 103 | } |
104 | 104 |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | $this->object->setConditions( $this->object->combine( '&&', $expr ) ); |
126 | 126 | $this->assertEquals( "( int_col = 1 AND ( str_col = 'test' ) )", $this->object->getConditionString( $types, $translations ) ); |
127 | 127 | |
128 | - $types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL); |
|
128 | + $types = array( 'column' => \Aimeos\MW\DB\Statement\Base::PARAM_BOOL ); |
|
129 | 129 | $this->object->setConditions( $this->object->compare( '==', 'column', 1 ) ); |
130 | 130 | $this->assertEquals( "column = 1", $this->object->getConditionString( $types ) ); |
131 | 131 | } |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | |
139 | 139 | $this->object->setConditions( $this->object->compare( '~=', 'str_column', null ) ); |
140 | 140 | |
141 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
141 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
142 | 142 | $this->object->getConditionString( $types ); |
143 | 143 | } |
144 | 144 | |
@@ -148,14 +148,14 @@ discard block |
||
148 | 148 | $types = array( 'int_column' => \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
149 | 149 | |
150 | 150 | $this->object->setConditions( $this->object->compare( '==', 'icol', 10 ) ); |
151 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
151 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
152 | 152 | $this->object->getConditionString( $types ); |
153 | 153 | } |
154 | 154 | |
155 | 155 | |
156 | 156 | public function testGetConditionStringInvalidOperator() |
157 | 157 | { |
158 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
158 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
159 | 159 | $this->object->setConditions( $this->object->compare( '?', 'int_column', 10 ) ); |
160 | 160 | } |
161 | 161 | |
@@ -189,14 +189,14 @@ discard block |
||
189 | 189 | $translations = array( 'asc_column' => 'asc_int_col' ); |
190 | 190 | |
191 | 191 | $this->object->setSortations( array( $this->object->sort( '+', 'asc_col' ) ) ); |
192 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
192 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
193 | 193 | $this->object->getSortationString( $types, $translations ); |
194 | 194 | } |
195 | 195 | |
196 | 196 | |
197 | 197 | public function testGetSortationStringInvalidDirection() |
198 | 198 | { |
199 | - $this->setExpectedException('\\Aimeos\\MW\\Common\\Exception'); |
|
199 | + $this->setExpectedException( '\\Aimeos\\MW\\Common\\Exception' ); |
|
200 | 200 | $this->object->setSortations( array( $this->object->sort( '/', 'asc_column' ) ) ); |
201 | 201 | } |
202 | 202 | |
@@ -205,10 +205,10 @@ discard block |
||
205 | 205 | { |
206 | 206 | $types = array( 'asc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_INT, 'desc_column' => \Aimeos\MW\DB\Statement\Base::PARAM_STR ); |
207 | 207 | |
208 | - $this->assertEquals('asc_column ASC', $this->object->getSortationString( $types ) ); |
|
208 | + $this->assertEquals( 'asc_column ASC', $this->object->getSortationString( $types ) ); |
|
209 | 209 | |
210 | 210 | $translations = array( 'asc_column' => 'asc_int_col', 'desc_column' => 'desc_str_col' ); |
211 | - $this->assertEquals('asc_int_col ASC', $this->object->getSortationString( $types, $translations )); |
|
211 | + $this->assertEquals( 'asc_int_col ASC', $this->object->getSortationString( $types, $translations ) ); |
|
212 | 212 | } |
213 | 213 | |
214 | 214 |
@@ -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(); |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | if( strncmp( $rname, 'db', 2 ) !== 0 ) { |
149 | 149 | unset( $dbconfig[$rname] ); |
150 | 150 | } else { |
151 | - $conf->set( 'resource/' . $rname . '/limit', 2 ); |
|
151 | + $conf->set( 'resource/'.$rname.'/limit', 2 ); |
|
152 | 152 | } |
153 | 153 | } |
154 | 154 | |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | } |
187 | 187 | |
188 | 188 | |
189 | - require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; |
|
189 | + require 'vendor'.DIRECTORY_SEPARATOR.'autoload.php'; |
|
190 | 190 | |
191 | 191 | $aimeos = new \Aimeos\Bootstrap( ( isset( $options['extdir'] ) ? (array) $options['extdir'] : array() ) ); |
192 | 192 | $taskPaths = $aimeos->getSetupPaths( $tplsite ); |
@@ -410,6 +410,7 @@ |
||
410 | 410 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
411 | 411 | * @param array $ref List of domains to fetch list items and referenced items for |
412 | 412 | * @param integer &$total Number of items that are available in total |
413 | + * @param integer $total |
|
413 | 414 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
414 | 415 | * |
415 | 416 | * @throws \Aimeos\MShop\Service\Exception if creating items failed |
@@ -226,8 +226,7 @@ |
||
226 | 226 | |
227 | 227 | $params[] = implode( ',', $list ); |
228 | 228 | } |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | $params[] = $this->escape( '==', $this->getParamType( $string ), $string ); |
233 | 232 | } |
@@ -644,7 +644,7 @@ |
||
644 | 644 | $statement = $conn->create( $sql ); |
645 | 645 | $statement->bind( 1, $siteId, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
646 | 646 | |
647 | - $context->getLogger()->log( __METHOD__ . ': SQL statement: ' . $statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
647 | + $context->getLogger()->log( __METHOD__.': SQL statement: '.$statement, \Aimeos\MW\Logger\Base::DEBUG ); |
|
648 | 648 | |
649 | 649 | return $statement->execute(); |
650 | 650 | } |
@@ -410,6 +410,7 @@ |
||
410 | 410 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
411 | 411 | * @param array $ref List of domains to fetch list items and referenced items for |
412 | 412 | * @param integer &$total Number of items that are available in total |
413 | + * @param integer $total |
|
413 | 414 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
414 | 415 | * |
415 | 416 | * @throws \Aimeos\MShop\Service\Exception if creating items failed |
@@ -126,7 +126,7 @@ |
||
126 | 126 | * @category User |
127 | 127 | */ |
128 | 128 | $this->loglevel = $config->get( 'madmin/log/manager/standard/loglevel', \Aimeos\MW\Logger\Base::WARN ); |
129 | - $this->requestid = md5( php_uname( 'n' ) . getmypid() . date( 'Y-m-d H:i:s' ) ); |
|
129 | + $this->requestid = md5( php_uname( 'n' ).getmypid().date( 'Y-m-d H:i:s' ) ); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 |
@@ -153,9 +153,12 @@ discard block |
||
153 | 153 | */ |
154 | 154 | public function createItem() |
155 | 155 | { |
156 | - try { |
|
156 | + try |
|
157 | + { |
|
157 | 158 | $siteid = $this->getContext()->getLocale()->getSiteId(); |
158 | - } catch( \Exception $e ) { |
|
159 | + } |
|
160 | + catch( \Exception $e ) |
|
161 | + { |
|
159 | 162 | $siteid = null; |
160 | 163 | } |
161 | 164 | |
@@ -183,9 +186,12 @@ discard block |
||
183 | 186 | |
184 | 187 | $context = $this->getContext(); |
185 | 188 | |
186 | - try { |
|
189 | + try |
|
190 | + { |
|
187 | 191 | $siteid = $context->getLocale()->getSiteId(); |
188 | - } catch( \Exception $e ) { |
|
192 | + } |
|
193 | + catch( \Exception $e ) |
|
194 | + { |
|
189 | 195 | $siteid = null; |
190 | 196 | } |
191 | 197 | |
@@ -235,8 +241,7 @@ discard block |
||
235 | 241 | * @see madmin/log/manager/standard/count/ansi |
236 | 242 | */ |
237 | 243 | $path = 'madmin/log/manager/standard/insert'; |
238 | - } |
|
239 | - else |
|
244 | + } else |
|
240 | 245 | { |
241 | 246 | /** madmin/log/manager/standard/update/mysql |
242 | 247 | * Updates an existing log record in the database |
@@ -410,6 +410,7 @@ |
||
410 | 410 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
411 | 411 | * @param array $ref List of domains to fetch list items and referenced items for |
412 | 412 | * @param integer &$total Number of items that are available in total |
413 | + * @param integer $total |
|
413 | 414 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
414 | 415 | * |
415 | 416 | * @throws \Aimeos\MShop\Service\Exception if creating items failed |
@@ -226,8 +226,7 @@ |
||
226 | 226 | |
227 | 227 | $params[] = implode( ',', $list ); |
228 | 228 | } |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | $params[] = $this->escape( '==', $this->getParamType( $string ), $string ); |
233 | 232 | } |
@@ -410,6 +410,7 @@ |
||
410 | 410 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
411 | 411 | * @param array $ref List of domains to fetch list items and referenced items for |
412 | 412 | * @param integer &$total Number of items that are available in total |
413 | + * @param integer $total |
|
413 | 414 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
414 | 415 | * |
415 | 416 | * @throws \Aimeos\MShop\Service\Exception if creating items failed |
@@ -226,8 +226,7 @@ |
||
226 | 226 | |
227 | 227 | $params[] = implode( ',', $list ); |
228 | 228 | } |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | $params[] = $this->escape( '==', $this->getParamType( $string ), $string ); |
233 | 232 | } |
@@ -741,7 +741,7 @@ |
||
741 | 741 | * @see mshop/order/manager/base/coupon/decorators/global |
742 | 742 | */ |
743 | 743 | |
744 | - return $this->getSubManagerBase( 'order', 'base/coupon/' . $manager, $name ); |
|
744 | + return $this->getSubManagerBase( 'order', 'base/coupon/'.$manager, $name ); |
|
745 | 745 | } |
746 | 746 | |
747 | 747 |
@@ -410,6 +410,7 @@ |
||
410 | 410 | * @param \Aimeos\MW\Criteria\Iface $search Search criteria object |
411 | 411 | * @param array $ref List of domains to fetch list items and referenced items for |
412 | 412 | * @param integer &$total Number of items that are available in total |
413 | + * @param integer $total |
|
413 | 414 | * @return array List of service items implementing \Aimeos\MShop\Service\Item\Iface |
414 | 415 | * |
415 | 416 | * @throws \Aimeos\MShop\Service\Exception if creating items failed |
@@ -226,8 +226,7 @@ |
||
226 | 226 | |
227 | 227 | $params[] = implode( ',', $list ); |
228 | 228 | } |
229 | - } |
|
230 | - else |
|
229 | + } else |
|
231 | 230 | { |
232 | 231 | $params[] = $this->escape( '==', $this->getParamType( $string ), $string ); |
233 | 232 | } |
@@ -770,7 +770,7 @@ |
||
770 | 770 | * @see mshop/order/manager/base/service/attribute/decorators/global |
771 | 771 | */ |
772 | 772 | |
773 | - return $this->getSubManagerBase( 'order', 'base/service/attribute/' . $manager, $name ); |
|
773 | + return $this->getSubManagerBase( 'order', 'base/service/attribute/'.$manager, $name ); |
|
774 | 774 | } |
775 | 775 | |
776 | 776 |