@@ -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 |
@@ -471,9 +471,13 @@ |
||
471 | 471 | $stmt->bind( 5, $date ); //mtime |
472 | 472 | $stmt->bind( 6, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
473 | 473 | |
474 | - try { |
|
474 | + try |
|
475 | + { |
|
475 | 476 | $stmt->execute()->finish(); |
476 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
477 | + } |
|
478 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
479 | + { |
|
480 | +; } // Ignore duplicates |
|
477 | 481 | } |
478 | 482 | } |
479 | 483 |
@@ -713,7 +713,7 @@ |
||
713 | 713 | |
714 | 714 | try { |
715 | 715 | $stmt->execute()->finish(); |
716 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
716 | + } catch( \Aimeos\MW\DB\Exception $e ) {; } // Ignore duplicates |
|
717 | 717 | } |
718 | 718 | } |
719 | 719 | } |
@@ -680,9 +680,13 @@ |
||
680 | 680 | $stmt->bind( 11, $date ); //mtime |
681 | 681 | $stmt->bind( 12, $siteid, \Aimeos\MW\DB\Statement\Base::PARAM_INT ); |
682 | 682 | |
683 | - try { |
|
683 | + try |
|
684 | + { |
|
684 | 685 | $stmt->execute()->finish(); |
685 | - } catch( \Aimeos\MW\DB\Exception $e ) { ; } // Ignore duplicates |
|
686 | + } |
|
687 | + catch( \Aimeos\MW\DB\Exception $e ) |
|
688 | + { |
|
689 | +; } // Ignore duplicates |
|
686 | 690 | } |
687 | 691 | } |
688 | 692 | } |
@@ -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 ); |