@@ -102,8 +102,7 @@ |
||
102 | 102 | { |
103 | 103 | $this->cache[$name] = $value; |
104 | 104 | unset( $this->negCache[$name] ); |
105 | - } |
|
106 | - else |
|
105 | + } else |
|
107 | 106 | { |
108 | 107 | $this->negCache[$name] = true; |
109 | 108 | } |
@@ -241,9 +241,12 @@ |
||
241 | 241 | { |
242 | 242 | if( self::$node === null ) |
243 | 243 | { |
244 | - try { |
|
244 | + try |
|
245 | + { |
|
245 | 246 | self::$node = random_bytes( 6 ); |
246 | - } catch( \Throwable $t ) { |
|
247 | + } |
|
248 | + catch( \Throwable $t ) |
|
249 | + { |
|
247 | 250 | if( function_exists( 'openssl_random_pseudo_bytes' ) ) { |
248 | 251 | self::$node = openssl_random_pseudo_bytes( 6 ); |
249 | 252 | } else { |
@@ -108,9 +108,12 @@ |
||
108 | 108 | */ |
109 | 109 | public function scan( string $path = null ) : iterable |
110 | 110 | { |
111 | - try { |
|
111 | + try |
|
112 | + { |
|
112 | 113 | return new \DirectoryIterator( $this->resolve( (string) $path ) ); |
113 | - } catch( \Exception $e ) { |
|
114 | + } |
|
115 | + catch( \Exception $e ) |
|
116 | + { |
|
114 | 117 | throw new Exception( $e->getMessage(), 0, $e ); |
115 | 118 | } |
116 | 119 | } |
@@ -32,9 +32,12 @@ discard block |
||
32 | 32 | { |
33 | 33 | parent::__construct( $config ); |
34 | 34 | |
35 | - try { |
|
35 | + try |
|
36 | + { |
|
36 | 37 | $this->conn = $this->createConnection(); |
37 | - } catch( \Aimeos\Base\DB\Exception $e ) { |
|
38 | + } |
|
39 | + catch( \Aimeos\Base\DB\Exception $e ) |
|
40 | + { |
|
38 | 41 | throw new \Aimeos\Base\MQueue\Exception( $e->getMessage() ); |
39 | 42 | } |
40 | 43 | } |
@@ -110,14 +113,12 @@ discard block |
||
110 | 113 | { |
111 | 114 | $dsn .= 'Database=' . $dbase; |
112 | 115 | $dsn .= isset( $host ) ? ';Server=' . $host . ( isset( $port ) ? ',' . $port : '' ) : ''; |
113 | - } |
|
114 | - elseif( $sock == null ) |
|
116 | + } elseif( $sock == null ) |
|
115 | 117 | { |
116 | 118 | $dsn .= 'dbname=' . $dbase; |
117 | 119 | $dsn .= isset( $host ) ? ';host=' . $host : ''; |
118 | 120 | $dsn .= isset( $port ) ? ';port=' . $port : ''; |
119 | - } |
|
120 | - else |
|
121 | + } else |
|
121 | 122 | { |
122 | 123 | $dsn .= 'dbname=' . $dbase . ';unix_socket=' . $sock; |
123 | 124 | } |