| @@ -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 | } | 
| @@ -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 | } | 
| @@ -232,7 +232,7 @@ discard block | ||
| 232 | 232 |  	{ | 
| 233 | 233 | if( $data ) | 
| 234 | 234 |  		{ | 
| 235 | - $mimetype = $mimetype ?: (new \finfo( FILEINFO_MIME_TYPE ))->buffer( $data ); | |
| 235 | + $mimetype = $mimetype ?: ( new \finfo( FILEINFO_MIME_TYPE ) )->buffer( $data ); | |
| 236 | 236 | $filename = $filename ?: md5( $data ); | 
| 237 | 237 | |
| 238 | 238 | $this->message->attach( $data, $filename, $mimetype ); | 
| @@ -254,7 +254,7 @@ discard block | ||
| 254 | 254 |  	{ | 
| 255 | 255 | if( $data ) | 
| 256 | 256 |  		{ | 
| 257 | - $mimetype = $mimetype ?: (new \finfo( FILEINFO_MIME_TYPE ))->buffer( $data ); | |
| 257 | + $mimetype = $mimetype ?: ( new \finfo( FILEINFO_MIME_TYPE ) )->buffer( $data ); | |
| 258 | 258 | $filename = $filename ?: md5( $data ); | 
| 259 | 259 | |
| 260 | 260 | $this->message->embed( $data, $filename, $mimetype ); | 
| @@ -484,8 +484,7 @@ | ||
| 484 | 484 | */ | 
| 485 | 485 | $path = 'mshop/customer/manager/laravel/insert'; | 
| 486 | 486 | $sql = $this->addSqlColumns( array_keys( $columns ), $this->getSqlConfig( $path ) ); | 
| 487 | - } | |
| 488 | - else | |
| 487 | + } else | |
| 489 | 488 |  		{ | 
| 490 | 489 | /** mshop/customer/manager/laravel/update | 
| 491 | 490 | * 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 | } | 
| @@ -223,9 +244,12 @@ discard block | ||
| 223 | 244 | */ | 
| 224 | 245 | public function reads( string $path ) | 
| 225 | 246 |  	{ | 
| 226 | -		try { | |
| 247 | + try | |
| 248 | +		{ | |
| 227 | 249 | $content = $this->fs->get( $path ); | 
| 228 | -		} catch( \Exception $e ) { | |
| 250 | + } | |
| 251 | + catch( \Exception $e ) | |
| 252 | +		{ | |
| 229 | 253 | throw new Exception( $e->getMessage(), 0, $e ); | 
| 230 | 254 | } | 
| 231 | 255 | |
| @@ -257,9 +281,12 @@ discard block | ||
| 257 | 281 | */ | 
| 258 | 282 | public function write( string $path, string $content ) : Iface | 
| 259 | 283 |  	{ | 
| 260 | -		try { | |
| 284 | + try | |
| 285 | +		{ | |
| 261 | 286 | $this->fs->put( $path, $content ); | 
| 262 | -		} catch( \Exception $e ) { | |
| 287 | + } | |
| 288 | + catch( \Exception $e ) | |
| 289 | +		{ | |
| 263 | 290 | throw new Exception( $e->getMessage(), 0, $e ); | 
| 264 | 291 | } | 
| 265 | 292 | |
| @@ -326,9 +353,12 @@ discard block | ||
| 326 | 353 | */ | 
| 327 | 354 | public function move( string $from, string $to ) : Iface | 
| 328 | 355 |  	{ | 
| 329 | -		try { | |
| 356 | + try | |
| 357 | +		{ | |
| 330 | 358 | $this->fs->move( $from, $to ); | 
| 331 | -		} catch( \Exception $e ) { | |
| 359 | + } | |
| 360 | + catch( \Exception $e ) | |
| 361 | +		{ | |
| 332 | 362 | throw new Exception( $e->getMessage(), 0, $e ); | 
| 333 | 363 | } | 
| 334 | 364 | |
| @@ -346,9 +376,12 @@ discard block | ||
| 346 | 376 | */ | 
| 347 | 377 | public function copy( string $from, string $to ) : Iface | 
| 348 | 378 |  	{ | 
| 349 | -		try { | |
| 379 | + try | |
| 380 | +		{ | |
| 350 | 381 | $this->fs->copy( $from, $to ); | 
| 351 | -		} catch( \Exception $e ) { | |
| 382 | + } | |
| 383 | + catch( \Exception $e ) | |
| 384 | +		{ | |
| 352 | 385 | throw new Exception( $e->getMessage(), 0, $e ); | 
| 353 | 386 | } | 
| 354 | 387 | |