@@ -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 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | throw new \Aimeos\MW\Filesystem\Exception( 'File system not configured' ); |
33 | 33 | } |
34 | 34 | |
35 | - $classname = '\\Aimeos\\MW\\Filesystem\\' . ucfirst( (string) $config['adapter'] ); |
|
35 | + $classname = '\\Aimeos\\MW\\Filesystem\\'.ucfirst( (string) $config['adapter'] ); |
|
36 | 36 | |
37 | 37 | if( !class_exists( $classname ) ) { |
38 | 38 | throw new \Aimeos\MW\Filesystem\Exception( sprintf( 'File system "%1$s" not found', $config['adapter'] ) ); |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $ds = DIRECTORY_SEPARATOR; |
50 | - $this->basedir = realpath( str_replace( '/', $ds, rtrim( $config['basedir'], '/' ) ) ) . $ds; |
|
51 | - $this->tempdir = realpath( str_replace( '/', $ds, rtrim( $config['tempdir'], '/' ) ) ) . $ds; |
|
50 | + $this->basedir = realpath( str_replace( '/', $ds, rtrim( $config['basedir'], '/' ) ) ).$ds; |
|
51 | + $this->tempdir = realpath( str_replace( '/', $ds, rtrim( $config['tempdir'], '/' ) ) ).$ds; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | |
@@ -349,6 +349,6 @@ discard block |
||
349 | 349 | throw new Exception( sprintf( 'No ".." allowed in path "%1$s"', $path ) ); |
350 | 350 | } |
351 | 351 | |
352 | - return $this->basedir . str_replace( '/', DIRECTORY_SEPARATOR, $path ); |
|
352 | + return $this->basedir.str_replace( '/', DIRECTORY_SEPARATOR, $path ); |
|
353 | 353 | } |
354 | 354 | } |
@@ -104,9 +104,12 @@ |
||
104 | 104 | */ |
105 | 105 | public function scan( $path = null ) |
106 | 106 | { |
107 | - try { |
|
107 | + try |
|
108 | + { |
|
108 | 109 | return new \DirectoryIterator( $this->resolve( $path ) ); |
109 | - } catch( \Exception $e ) { |
|
110 | + } |
|
111 | + catch( \Exception $e ) |
|
112 | + { |
|
110 | 113 | throw new Exception( $e->getMessage(), 0, $e ); |
111 | 114 | } |
112 | 115 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | protected function getConfig( $name ) |
64 | 64 | { |
65 | - if( ( $conf = $this->config->get( 'resource/' . $name ) ) !== null ) { |
|
65 | + if( ( $conf = $this->config->get( 'resource/'.$name ) ) !== null ) { |
|
66 | 66 | return $conf; |
67 | 67 | } |
68 | 68 |
@@ -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; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | throw new \Aimeos\MW\MQueue\Exception( 'Message queue not configured' ); |
33 | 33 | } |
34 | 34 | |
35 | - $classname = '\\Aimeos\\MW\\MQueue\\' . ucfirst( (string) $config['adapter'] ); |
|
35 | + $classname = '\\Aimeos\\MW\\MQueue\\'.ucfirst( (string) $config['adapter'] ); |
|
36 | 36 | |
37 | 37 | if( !class_exists( $classname ) ) { |
38 | 38 | throw new \Aimeos\MW\MQueue\Exception( sprintf( 'Message queue "%1$s" not found', $config['adapter'] ) ); |