@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | public function transform( $url ) |
55 | 55 | { |
56 | - if( strncmp( $url, 'http', 4 ) !== 0 && strncmp( $url, 'data:', 5 ) !== 0 && strncmp( $url, '/', 1 ) !== 0 ) { |
|
56 | + if( strncmp( $url, 'http', 4 ) !== 0 && strncmp( $url, 'data:', 5 ) !== 0 && strncmp( $url, '/', 1 ) !== 0 ) { |
|
57 | 57 | $url = $this->baseurl . '/' . $url; |
58 | 58 | } |
59 | 59 |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $mime = explode( '/', $mimetype ); |
50 | 50 | |
51 | 51 | $type = ( $mime[0] === 'image' ? 'Image' : 'Application' ); |
52 | - $name = ( isset( $options[ $mime[0] ]['name'] ) ? ucfirst( $options[ $mime[0] ]['name'] ) : 'Standard' ); |
|
52 | + $name = ( isset( $options[$mime[0]]['name'] ) ? ucfirst( $options[$mime[0]]['name'] ) : 'Standard' ); |
|
53 | 53 | |
54 | 54 | |
55 | 55 | if( ctype_alnum( $name ) === false ) |
@@ -38,7 +38,7 @@ |
||
38 | 38 | foreach( $paths as $path ) |
39 | 39 | { |
40 | 40 | $file = $path . DIRECTORY_SEPARATOR . $filename; |
41 | - if( file_exists( $file ) === true && ( include_once $file ) !== false && class_exists($classname)) { |
|
41 | + if( file_exists( $file ) === true && ( include_once $file ) !== false && class_exists( $classname ) ) { |
|
42 | 42 | return new $classname( $config ); |
43 | 43 | } |
44 | 44 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | throw new \Aimeos\MW\Cache\Exception( sprintf( 'Class "%1$s" not available', $classname ) ); |
45 | 45 | } |
46 | 46 | |
47 | - $manager = new $classname( $config, $resource ); |
|
47 | + $manager = new $classname( $config, $resource ); |
|
48 | 48 | |
49 | 49 | if( !( $manager instanceof $iface ) ) { |
50 | 50 | throw new \Aimeos\MW\Cache\Exception( sprintf( 'Class "%1$s" does not implement interface "%2$s"', $classname, $iface ) ); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $rows[] = $row; |
94 | 94 | } |
95 | 95 | |
96 | - $actual[ $entry->getName() ] = count( $rows ); |
|
96 | + $actual[$entry->getName()] = count( $rows ); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $this->assertEquals( $expected, $actual ); |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $rows[] = $row; |
94 | 94 | } |
95 | 95 | |
96 | - $actual[ $entry->getName() ] = count( $rows ); |
|
96 | + $actual[$entry->getName()] = count( $rows ); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | $this->assertEquals( $expected, $actual ); |
@@ -521,7 +521,7 @@ |
||
521 | 521 | |
522 | 522 | try { |
523 | 523 | $stmt->execute()->finish(); |
524 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
524 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
525 | 525 | } |
526 | 526 | } |
527 | 527 |
@@ -472,9 +472,13 @@ |
||
472 | 472 | $stmt->bind( 5, $date ); //mtime |
473 | 473 | $stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
474 | 474 | |
475 | - try { |
|
475 | + try |
|
476 | + { |
|
476 | 477 | $stmt->execute()->finish(); |
477 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
478 | + } |
|
479 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
480 | + { |
|
481 | +; } // Ignore duplicates |
|
478 | 482 | } |
479 | 483 | } |
480 | 484 |
@@ -23,7 +23,9 @@ discard block |
||
23 | 23 | public function testRun() |
24 | 24 | { |
25 | 25 | $object = new \Aimeos\MW\Process\Pcntl(); |
26 | - $fcn = function() { sleep( 1 ); }; |
|
26 | + $fcn = function() |
|
27 | + { |
|
28 | +sleep( 1 ); }; |
|
27 | 29 | |
28 | 30 | $start = microtime( true ); |
29 | 31 | $return = $object->start( $fcn, [] )->start( $fcn, [] )->wait(); |
@@ -36,7 +38,9 @@ discard block |
||
36 | 38 | |
37 | 39 | public function testRunError() |
38 | 40 | { |
39 | - $fcn = function() { throw new \Exception(); }; |
|
41 | + $fcn = function() |
|
42 | + { |
|
43 | +throw new \Exception(); }; |
|
40 | 44 | |
41 | 45 | stream_filter_register( "redirect", "\Aimeos\MW\Process\DiscardFilter" ); |
42 | 46 | $filter = stream_filter_prepend( STDERR, "redirect", STREAM_FILTER_WRITE ); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | $search->setConditions( $search->combine( '&&', $expr ) ); |
123 | 123 | |
124 | 124 | foreach( $manager->searchItems( $search ) as $listid => $listItem ) { |
125 | - $listMap[ $listItem->getRefId() ] = $listid; |
|
125 | + $listMap[$listItem->getRefId()] = $listid; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | $listItem->setTypeId( $typeId ); |
138 | 138 | $listItem->setStatus( 1 ); |
139 | 139 | |
140 | - $pos = count( $listMap ) ; |
|
140 | + $pos = count( $listMap ); |
|
141 | 141 | |
142 | 142 | foreach( $item->getGroups() as $gid ) |
143 | 143 | { |