@@ -72,12 +72,12 @@ |
||
| 72 | 72 | |
| 73 | 73 | if( ctype_alnum( $name ) === false ) |
| 74 | 74 | { |
| 75 | - $classname = is_string( $name ) ? '\\Aimeos\\MShop\\Customer\\Manager\\' . $name : '<not a string>'; |
|
| 75 | + $classname = is_string( $name ) ? '\\Aimeos\\MShop\\Customer\\Manager\\'.$name : '<not a string>'; |
|
| 76 | 76 | throw new \Aimeos\MShop\Customer\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) ); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | $iface = '\\Aimeos\\MShop\\Customer\\Manager\\Iface'; |
| 80 | - $classname = '\\Aimeos\\MShop\\Customer\\Manager\\' . $name; |
|
| 80 | + $classname = '\\Aimeos\\MShop\\Customer\\Manager\\'.$name; |
|
| 81 | 81 | |
| 82 | 82 | $manager = self::createManagerBase( $context, $classname, $iface ); |
| 83 | 83 | |
@@ -319,7 +319,7 @@ |
||
| 319 | 319 | * @see mshop/customer/manager/lists/decorators/global |
| 320 | 320 | */ |
| 321 | 321 | |
| 322 | - return $this->getSubManagerBase( 'customer', 'lists/' . $manager, $name ); |
|
| 322 | + return $this->getSubManagerBase( 'customer', 'lists/'.$manager, $name ); |
|
| 323 | 323 | } |
| 324 | 324 | |
| 325 | 325 | |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | * @see mshop/customer/manager/lists/type/decorators/global |
| 283 | 283 | */ |
| 284 | 284 | |
| 285 | - return $this->getSubManagerBase( 'customer', 'lists/type/' . $manager, $name ); |
|
| 285 | + return $this->getSubManagerBase( 'customer', 'lists/type/'.$manager, $name ); |
|
| 286 | 286 | } |
| 287 | 287 | |
| 288 | 288 | |
@@ -403,7 +403,7 @@ |
||
| 403 | 403 | * @see mshop/customer/manager/address/decorators/global |
| 404 | 404 | */ |
| 405 | 405 | |
| 406 | - return $this->getSubManagerBase( 'customer', 'address/' . $manager, $name ); |
|
| 406 | + return $this->getSubManagerBase( 'customer', 'address/'.$manager, $name ); |
|
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | |
@@ -165,10 +165,10 @@ discard block |
||
| 165 | 165 | $expected = '<?xml version="1.0" encoding="UTF-8"?> |
| 166 | 166 | <orderlist> |
| 167 | 167 | <orderitem> |
| 168 | - <id><![CDATA['. $order->getId() . ']]></id> |
|
| 168 | + <id><![CDATA['. $order->getId().']]></id> |
|
| 169 | 169 | <type><![CDATA[web]]></type> |
| 170 | 170 | <datetime><![CDATA[2008-02-15T12:34:56Z]]></datetime> |
| 171 | - <customerid><![CDATA[' . $orderBase->getCustomerId() . ']]></customerid> |
|
| 171 | + <customerid><![CDATA[' . $orderBase->getCustomerId().']]></customerid> |
|
| 172 | 172 | <projectcode><![CDATA[8502_TEST]]></projectcode> |
| 173 | 173 | <languagecode><![CDATA[DE]]></languagecode> |
| 174 | 174 | <currencycode><![CDATA[EUR]]></currencycode> |
@@ -359,10 +359,10 @@ discard block |
||
| 359 | 359 | $expected = '<?xml version="1.0" encoding="UTF-8"?> |
| 360 | 360 | <orderlist> |
| 361 | 361 | <orderitem> |
| 362 | - <id><![CDATA['. $order->getId() . ']]></id> |
|
| 362 | + <id><![CDATA['. $order->getId().']]></id> |
|
| 363 | 363 | <type><![CDATA[web]]></type> |
| 364 | 364 | <datetime><![CDATA[2009-03-18T16:14:32Z]]></datetime> |
| 365 | - <customerid><![CDATA[' . $orderBase->getCustomerId() . ']]></customerid> |
|
| 365 | + <customerid><![CDATA[' . $orderBase->getCustomerId().']]></customerid> |
|
| 366 | 366 | <projectcode><![CDATA[8502_TEST]]></projectcode> |
| 367 | 367 | <languagecode><![CDATA[DE]]></languagecode> |
| 368 | 368 | <currencycode><![CDATA[EUR]]></currencycode> |
@@ -154,7 +154,9 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | public function testCheckResponseInvalidXml() |
| 156 | 156 | { |
| 157 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 157 | + set_error_handler( function( $errno, $errstr ) |
|
| 158 | + { |
|
| 159 | +} ); |
|
| 158 | 160 | |
| 159 | 161 | $class = new \ReflectionClass( '\Aimeos\MShop\Service\Provider\Delivery\Standard' ); |
| 160 | 162 | $method = $class->getMethod( 'checkResponse' ); |
@@ -167,7 +169,9 @@ discard block |
||
| 167 | 169 | |
| 168 | 170 | public function testCheckResponseInvalidSchema() |
| 169 | 171 | { |
| 170 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 172 | + set_error_handler( function( $errno, $errstr ) |
|
| 173 | + { |
|
| 174 | +} ); |
|
| 171 | 175 | |
| 172 | 176 | $class = new \ReflectionClass( '\Aimeos\MShop\Service\Provider\Delivery\Standard' ); |
| 173 | 177 | $method = $class->getMethod( 'checkResponse' ); |
@@ -180,7 +184,9 @@ discard block |
||
| 180 | 184 | |
| 181 | 185 | public function testCheckResponseGlobalError() |
| 182 | 186 | { |
| 183 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 187 | + set_error_handler( function( $errno, $errstr ) |
|
| 188 | + { |
|
| 189 | +} ); |
|
| 184 | 190 | $xml = '<response><error>1</error><orderlist></orderlist></response>'; |
| 185 | 191 | |
| 186 | 192 | $class = new \ReflectionClass( '\Aimeos\MShop\Service\Provider\Delivery\Standard' ); |
@@ -194,7 +200,9 @@ discard block |
||
| 194 | 200 | |
| 195 | 201 | public function testCheckResponseInvalidInvoice() |
| 196 | 202 | { |
| 197 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 203 | + set_error_handler( function( $errno, $errstr ) |
|
| 204 | + { |
|
| 205 | +} ); |
|
| 198 | 206 | $xml = '<response> |
| 199 | 207 | <error>0</error> |
| 200 | 208 | <orderlist> |
@@ -218,7 +226,9 @@ discard block |
||
| 218 | 226 | |
| 219 | 227 | public function testCheckResponseInvalidStatus() |
| 220 | 228 | { |
| 221 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 229 | + set_error_handler( function( $errno, $errstr ) |
|
| 230 | + { |
|
| 231 | +} ); |
|
| 222 | 232 | $xml = '<response> |
| 223 | 233 | <error>0</error> |
| 224 | 234 | <orderlist> |
@@ -242,7 +252,9 @@ discard block |
||
| 242 | 252 | |
| 243 | 253 | public function testCheckResponse() |
| 244 | 254 | { |
| 245 | - set_error_handler( function( $errno, $errstr ) {} ); |
|
| 255 | + set_error_handler( function( $errno, $errstr ) |
|
| 256 | + { |
|
| 257 | +} ); |
|
| 246 | 258 | $xml = '<response> |
| 247 | 259 | <error>0</error> |
| 248 | 260 | <orderlist> |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | |
| 159 | 159 | public function testSetContentUtf8Invalid() |
| 160 | 160 | { |
| 161 | - $this->object->setContent( chr( 0x96 ) . 'укгезәөшөхзәхөшк2049һһлдябчсячмииюсит.июбҗрарэ' ); |
|
| 161 | + $this->object->setContent( chr( 0x96 ).'укгезәөшөхзәхөшк2049һһлдябчсячмииюсит.июбҗрарэ' ); |
|
| 162 | 162 | $this->assertEquals( 'укгезәөшөхзәхөшк2049һһлдябчсячмииюсит.июбҗрарэ', $this->object->getContent() ); |
| 163 | 163 | |
| 164 | 164 | $this->object->setContent( mb_convert_encoding( '�رز', 'UTF-8', 'HTML-ENTITIES' ) ); |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | $langid = $context->getLocale()->getLanguageId(); |
| 213 | 213 | |
| 214 | 214 | $sqlProd = 'SELECT "value" FROM "mshop_index_text" |
| 215 | - WHERE "siteid" = ? AND "prodid" = ? AND "langid" = \'' . $langid . '\' |
|
| 215 | + WHERE "siteid" = ? AND "prodid" = ? AND "langid" = \'' . $langid.'\' |
|
| 216 | 216 | AND "type" = \'name\' AND domain = \'product\''; |
| 217 | 217 | $sqlAttr = 'SELECT "value" FROM "mshop_index_text" |
| 218 | 218 | WHERE "siteid" = ? AND "prodid" = ? AND type = \'name\' AND domain = \'attribute\''; |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $catalogManager->getTree( null, array( 'text', 'media' ) ); |
| 34 | 34 | |
| 35 | 35 | $stop = microtime( true ); |
| 36 | - echo "\n catalog tree w/o ID: " . ( ( $stop - $start ) * 1000 ) . " msec\n"; |
|
| 36 | + echo "\n catalog tree w/o ID: ".( ( $stop - $start ) * 1000 )." msec\n"; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | |
@@ -45,6 +45,6 @@ discard block |
||
| 45 | 45 | $catalogManager->getTree( $this->root->getId(), array( 'text', 'media' ) ); |
| 46 | 46 | |
| 47 | 47 | $stop = microtime( true ); |
| 48 | - echo "\n catalog tree with ID: " . ( ( $stop - $start ) * 1000 ) . " msec\n"; |
|
| 48 | + echo "\n catalog tree with ID: ".( ( $stop - $start ) * 1000 )." msec\n"; |
|
| 49 | 49 | } |
| 50 | 50 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | $stop = microtime( true ); |
| 52 | - echo "\n product detail: " . ( ( $stop - $start ) * 1000 ) . " msec\n"; |
|
| 52 | + echo "\n product detail: ".( ( $stop - $start ) * 1000 )." msec\n"; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | } |