@@ -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'] ) ); |
@@ -66,7 +66,7 @@ |
||
66 | 66 | */ |
67 | 67 | protected function getConfig( &$resource ) |
68 | 68 | { |
69 | - if( ( $conf = $this->config->get( 'resource/' . $resource ) ) !== null ) { |
|
69 | + if( ( $conf = $this->config->get( 'resource/'.$resource ) ) !== null ) { |
|
70 | 70 | return $conf; |
71 | 71 | } |
72 | 72 |
@@ -56,7 +56,7 @@ |
||
56 | 56 | } |
57 | 57 | |
58 | 58 | foreach( $names as $name ) { |
59 | - $result .= '[' . $name . ']'; |
|
59 | + $result .= '['.$name.']'; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return $result; |