@@ -117,8 +117,7 @@ |
||
| 117 | 117 | $value->getClientOriginalName(), |
| 118 | 118 | $value->getClientMimeType() |
| 119 | 119 | ); |
| 120 | - } |
|
| 121 | - elseif( is_array( $value ) ) |
|
| 120 | + } elseif( is_array( $value ) ) |
|
| 122 | 121 | { |
| 123 | 122 | $list[$key] = $this->getFiles( $value ); |
| 124 | 123 | } |
@@ -47,8 +47,7 @@ |
||
| 47 | 47 | $factory = $this->factory; |
| 48 | 48 | $lv = $factory->file( $filename, $values ); |
| 49 | 49 | |
| 50 | - $fcn = function() use ( $factory, $view ) |
|
| 51 | - { |
|
| 50 | + $fcn = function() use ( $factory, $view ) { |
|
| 52 | 51 | foreach( $factory->getSections() as $name => $section ) { |
| 53 | 52 | $view->block()->set( $name, $section ); |
| 54 | 53 | } |
@@ -44,9 +44,12 @@ discard block |
||
| 44 | 44 | $schema = $this->getSchema( 'db-customer' ); |
| 45 | 45 | $sql = 'SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = \'users\' AND COLUMN_NAME = \'id\''; |
| 46 | 46 | |
| 47 | - try { |
|
| 47 | + try |
|
| 48 | + { |
|
| 48 | 49 | $type = $this->getValue( $sql, 'COLUMN_TYPE', 'db-customer' ); |
| 49 | - } catch( \Aimeos\MW\Exception $e ) { |
|
| 50 | + } |
|
| 51 | + catch( \Aimeos\MW\Exception $e ) |
|
| 52 | + { |
|
| 50 | 53 | $type = null; |
| 51 | 54 | } |
| 52 | 55 | |
@@ -62,8 +65,7 @@ discard block |
||
| 62 | 65 | { |
| 63 | 66 | $this->execute( 'ALTER TABLE "users_address" DROP FOREIGN KEY "fk_lvuad_pid"', 'db-customer' ); |
| 64 | 67 | $this->status( 'done' ); |
| 65 | - } |
|
| 66 | - else |
|
| 68 | + } else |
|
| 67 | 69 | { |
| 68 | 70 | $this->status( 'OK' ); |
| 69 | 71 | } |
@@ -75,8 +77,7 @@ discard block |
||
| 75 | 77 | { |
| 76 | 78 | $this->execute( 'ALTER TABLE "users_list" DROP FOREIGN KEY "fk_lvuli_pid"', 'db-customer' ); |
| 77 | 79 | $this->status( 'done' ); |
| 78 | - } |
|
| 79 | - else |
|
| 80 | + } else |
|
| 80 | 81 | { |
| 81 | 82 | $this->status( 'OK' ); |
| 82 | 83 | } |
@@ -88,8 +89,7 @@ discard block |
||
| 88 | 89 | { |
| 89 | 90 | $this->execute( 'ALTER TABLE "users_property" DROP FOREIGN KEY "fk_lvupr_pid"', 'db-customer' ); |
| 90 | 91 | $this->status( 'done' ); |
| 91 | - } |
|
| 92 | - else |
|
| 92 | + } else |
|
| 93 | 93 | { |
| 94 | 94 | $this->status( 'OK' ); |
| 95 | 95 | } |
@@ -420,8 +420,7 @@ |
||
| 420 | 420 | */ |
| 421 | 421 | $path = 'mshop/customer/manager/laravel/insert'; |
| 422 | 422 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); |
| 423 | - } |
|
| 424 | - else |
|
| 423 | + } else |
|
| 425 | 424 | { |
| 426 | 425 | /** mshop/customer/manager/laravel/update |
| 427 | 426 | * Updates an existing customer record in the database |
@@ -58,9 +58,12 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function mkdir( string $path ) : DirIface |
| 60 | 60 | { |
| 61 | - try { |
|
| 61 | + try |
|
| 62 | + { |
|
| 62 | 63 | $this->fs->makeDirectory( $path ); |
| 63 | - } catch( \Exception $e ) { |
|
| 64 | + } |
|
| 65 | + catch( \Exception $e ) |
|
| 66 | + { |
|
| 64 | 67 | throw new Exception( $e->getMessage(), 0, $e ); |
| 65 | 68 | } |
| 66 | 69 | |
@@ -77,9 +80,12 @@ discard block |
||
| 77 | 80 | */ |
| 78 | 81 | public function rmdir( string $path ) : DirIface |
| 79 | 82 | { |
| 80 | - try { |
|
| 83 | + try |
|
| 84 | + { |
|
| 81 | 85 | $this->fs->deleteDirectory( $path ); |
| 82 | - } catch( \Exception $e ) { |
|
| 86 | + } |
|
| 87 | + catch( \Exception $e ) |
|
| 88 | + { |
|
| 83 | 89 | throw new Exception( $e->getMessage(), 0, $e ); |
| 84 | 90 | } |
| 85 | 91 | |
@@ -98,9 +104,12 @@ discard block |
||
| 98 | 104 | */ |
| 99 | 105 | public function scan( string $path = null ) : iterable |
| 100 | 106 | { |
| 101 | - try { |
|
| 107 | + try |
|
| 108 | + { |
|
| 102 | 109 | return array_merge( $this->fs->directories( $path ), $this->fs->files( $path ) ); |
| 103 | - } catch( \Exception $e ) { |
|
| 110 | + } |
|
| 111 | + catch( \Exception $e ) |
|
| 112 | + { |
|
| 104 | 113 | throw new Exception( $e->getMessage(), 0, $e ); |
| 105 | 114 | } |
| 106 | 115 | } |
@@ -115,9 +124,12 @@ discard block |
||
| 115 | 124 | */ |
| 116 | 125 | public function size( string $path ) : int |
| 117 | 126 | { |
| 118 | - try { |
|
| 127 | + try |
|
| 128 | + { |
|
| 119 | 129 | return $this->fs->size( $path ); |
| 120 | - } catch( \Exception $e ) { |
|
| 130 | + } |
|
| 131 | + catch( \Exception $e ) |
|
| 132 | + { |
|
| 121 | 133 | throw new Exception( $e->getMessage(), 0, $e ); |
| 122 | 134 | } |
| 123 | 135 | } |
@@ -132,9 +144,12 @@ discard block |
||
| 132 | 144 | */ |
| 133 | 145 | public function time( string $path ) : int |
| 134 | 146 | { |
| 135 | - try { |
|
| 147 | + try |
|
| 148 | + { |
|
| 136 | 149 | return $this->fs->lastModified( $path ); |
| 137 | - } catch( \Exception $e ) { |
|
| 150 | + } |
|
| 151 | + catch( \Exception $e ) |
|
| 152 | + { |
|
| 138 | 153 | throw new Exception( $e->getMessage(), 0, $e ); |
| 139 | 154 | } |
| 140 | 155 | } |
@@ -149,9 +164,12 @@ discard block |
||
| 149 | 164 | */ |
| 150 | 165 | public function rm( string $path ) : Iface |
| 151 | 166 | { |
| 152 | - try { |
|
| 167 | + try |
|
| 168 | + { |
|
| 153 | 169 | $this->fs->delete( $path ); |
| 154 | - } catch( \Exception $e ) { |
|
| 170 | + } |
|
| 171 | + catch( \Exception $e ) |
|
| 172 | + { |
|
| 155 | 173 | throw new Exception( $e->getMessage(), 0, $e ); |
| 156 | 174 | } |
| 157 | 175 | |
@@ -182,9 +200,12 @@ discard block |
||
| 182 | 200 | */ |
| 183 | 201 | public function read( string $path ) : string |
| 184 | 202 | { |
| 185 | - try { |
|
| 203 | + try |
|
| 204 | + { |
|
| 186 | 205 | return $this->fs->get( $path ); |
| 187 | - } catch( \Exception $e ) { |
|
| 206 | + } |
|
| 207 | + catch( \Exception $e ) |
|
| 208 | + { |
|
| 188 | 209 | throw new Exception( $e->getMessage(), 0, $e ); |
| 189 | 210 | } |
| 190 | 211 | } |
@@ -222,9 +243,12 @@ discard block |
||
| 222 | 243 | */ |
| 223 | 244 | public function reads( string $path ) |
| 224 | 245 | { |
| 225 | - try { |
|
| 246 | + try |
|
| 247 | + { |
|
| 226 | 248 | $content = $this->fs->get( $path ); |
| 227 | - } catch( \Exception $e ) { |
|
| 249 | + } |
|
| 250 | + catch( \Exception $e ) |
|
| 251 | + { |
|
| 228 | 252 | throw new Exception( $e->getMessage(), 0, $e ); |
| 229 | 253 | } |
| 230 | 254 | |
@@ -256,9 +280,12 @@ discard block |
||
| 256 | 280 | */ |
| 257 | 281 | public function write( string $path, string $content ) : Iface |
| 258 | 282 | { |
| 259 | - try { |
|
| 283 | + try |
|
| 284 | + { |
|
| 260 | 285 | $this->fs->put( $path, $content ); |
| 261 | - } catch( \Exception $e ) { |
|
| 286 | + } |
|
| 287 | + catch( \Exception $e ) |
|
| 288 | + { |
|
| 262 | 289 | throw new Exception( $e->getMessage(), 0, $e ); |
| 263 | 290 | } |
| 264 | 291 | |
@@ -303,9 +330,12 @@ discard block |
||
| 303 | 330 | throw new Exception( $error['message'] ); |
| 304 | 331 | } |
| 305 | 332 | |
| 306 | - try { |
|
| 333 | + try |
|
| 334 | + { |
|
| 307 | 335 | $this->fs->put( $path, $content ); |
| 308 | - } catch( \Exception $e ) { |
|
| 336 | + } |
|
| 337 | + catch( \Exception $e ) |
|
| 338 | + { |
|
| 309 | 339 | throw new Exception( $e->getMessage(), 0, $e ); |
| 310 | 340 | } |
| 311 | 341 | |
@@ -323,9 +353,12 @@ discard block |
||
| 323 | 353 | */ |
| 324 | 354 | public function move( string $from, string $to ) : Iface |
| 325 | 355 | { |
| 326 | - try { |
|
| 356 | + try |
|
| 357 | + { |
|
| 327 | 358 | $this->fs->move( $from, $to ); |
| 328 | - } catch( \Exception $e ) { |
|
| 359 | + } |
|
| 360 | + catch( \Exception $e ) |
|
| 361 | + { |
|
| 329 | 362 | throw new Exception( $e->getMessage(), 0, $e ); |
| 330 | 363 | } |
| 331 | 364 | |
@@ -343,9 +376,12 @@ discard block |
||
| 343 | 376 | */ |
| 344 | 377 | public function copy( string $from, string $to ) : Iface |
| 345 | 378 | { |
| 346 | - try { |
|
| 379 | + try |
|
| 380 | + { |
|
| 347 | 381 | $this->fs->copy( $from, $to ); |
| 348 | - } catch( \Exception $e ) { |
|
| 382 | + } |
|
| 383 | + catch( \Exception $e ) |
|
| 384 | + { |
|
| 349 | 385 | throw new Exception( $e->getMessage(), 0, $e ); |
| 350 | 386 | } |
| 351 | 387 | |
@@ -58,8 +58,7 @@ |
||
| 58 | 58 | ) { |
| 59 | 59 | $this->execute( $sql, 'db-customer' ); |
| 60 | 60 | $this->status( 'done' ); |
| 61 | - } |
|
| 62 | - else |
|
| 61 | + } else |
|
| 63 | 62 | { |
| 64 | 63 | $this->status( 'OK' ); |
| 65 | 64 | } |
@@ -51,9 +51,12 @@ |
||
| 51 | 51 | $message = json_encode( $message ); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - try { |
|
| 54 | + try |
|
| 55 | + { |
|
| 55 | 56 | $this->logger->log( $this->getLogLevel( $priority ), $message ); |
| 56 | - } catch( \Exception $e ) { |
|
| 57 | + } |
|
| 58 | + catch( \Exception $e ) |
|
| 59 | + { |
|
| 57 | 60 | throw new Exception( $e->getMessage(), $e->getCode(), $e ); |
| 58 | 61 | } |
| 59 | 62 | |