@@ -31,7 +31,7 @@ |
||
31 | 31 | /** |
32 | 32 | * Initializes the request view helper. |
33 | 33 | * |
34 | - * @param \\Aimeos\MW\View\Iface $view View instance with registered view helpers |
|
34 | + * @param \Aimeos\MW\View\Iface $view View instance with registered view helpers |
|
35 | 35 | * @param \Illuminate\Http\Request $request Laravel request object |
36 | 36 | */ |
37 | 37 | public function __construct( \Aimeos\MW\View\Iface $view, \Illuminate\Http\Request $request ) |
@@ -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,6 +47,9 @@ |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | |
50 | + /** |
|
51 | + * @param string $site |
|
52 | + */ |
|
50 | 53 | private static function createContext( $site ) |
51 | 54 | { |
52 | 55 | $ctx = new \Aimeos\MShop\Context\Item\Standard(); |
@@ -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 | } |
@@ -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 |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | /** |
382 | 382 | * Removes old entries from the storage. |
383 | 383 | * |
384 | - * @param iterable $siteids List of IDs for sites whose entries should be deleted |
|
384 | + * @param integer[] $siteids List of IDs for sites whose entries should be deleted |
|
385 | 385 | * @return \Aimeos\MShop\Common\Manager\Iface Same object for fluent interface |
386 | 386 | */ |
387 | 387 | public function clear( iterable $siteids ) : \Aimeos\MShop\Common\Manager\Iface |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * |
675 | 675 | * @param string $manager Name of the sub manager type in lower case |
676 | 676 | * @param string|null $name Name of the implementation, will be from configuration (or Default) if null |
677 | - * @return mixed Manager for different extensions, e.g stock, tags, locations, etc. |
|
677 | + * @return \Aimeos\MShop\Common\Manager\Iface Manager for different extensions, e.g stock, tags, locations, etc. |
|
678 | 678 | */ |
679 | 679 | public function getSubManager( string $manager, string $name = null ) : \Aimeos\MShop\Common\Manager\Iface |
680 | 680 | { |
@@ -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 |
@@ -39,7 +39,6 @@ |
||
39 | 39 | * Writes a message to the configured log facility. |
40 | 40 | * |
41 | 41 | * @param string|array|object $message Message text that should be written to the log facility |
42 | - * @param int $prio Priority of the message for filtering |
|
43 | 42 | * @param string $facility Facility for logging different types of messages (e.g. message, auth, user, changelog) |
44 | 43 | * @return \Aimeos\MW\Logger\Iface Logger object for method chaining |
45 | 44 | * @throws \Aimeos\MW\Logger\Exception If an error occurs in Zend_Log |
@@ -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 | |
@@ -325,9 +352,12 @@ discard block |
||
325 | 352 | */ |
326 | 353 | public function move( string $from, string $to ) : Iface |
327 | 354 | { |
328 | - try { |
|
355 | + try |
|
356 | + { |
|
329 | 357 | $this->fs->move( $from, $to ); |
330 | - } catch( \Exception $e ) { |
|
358 | + } |
|
359 | + catch( \Exception $e ) |
|
360 | + { |
|
331 | 361 | throw new Exception( $e->getMessage(), 0, $e ); |
332 | 362 | } |
333 | 363 | |
@@ -345,9 +375,12 @@ discard block |
||
345 | 375 | */ |
346 | 376 | public function copy( string $from, string $to ) : Iface |
347 | 377 | { |
348 | - try { |
|
378 | + try |
|
379 | + { |
|
349 | 380 | $this->fs->copy( $from, $to ); |
350 | - } catch( \Exception $e ) { |
|
381 | + } |
|
382 | + catch( \Exception $e ) |
|
383 | + { |
|
351 | 384 | throw new Exception( $e->getMessage(), 0, $e ); |
352 | 385 | } |
353 | 386 |
@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | { |
56 | 56 | $this->execute( 'ALTER TABLE "users_address" DROP FOREIGN KEY "fk_lvuad_pid"', 'db-customer' ); |
57 | 57 | $this->status( 'done' ); |
58 | - } |
|
59 | - else |
|
58 | + } else |
|
60 | 59 | { |
61 | 60 | $this->status( 'OK' ); |
62 | 61 | } |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | { |
69 | 68 | $this->execute( 'ALTER TABLE "users_list" DROP FOREIGN KEY "fk_lvuli_pid"', 'db-customer' ); |
70 | 69 | $this->status( 'done' ); |
71 | - } |
|
72 | - else |
|
70 | + } else |
|
73 | 71 | { |
74 | 72 | $this->status( 'OK' ); |
75 | 73 | } |
@@ -81,8 +79,7 @@ discard block |
||
81 | 79 | { |
82 | 80 | $this->execute( 'ALTER TABLE "users_property" DROP FOREIGN KEY "fk_lvupr_pid"', 'db-customer' ); |
83 | 81 | $this->status( 'done' ); |
84 | - } |
|
85 | - else |
|
82 | + } else |
|
86 | 83 | { |
87 | 84 | $this->status( 'OK' ); |
88 | 85 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * |
74 | 74 | * @inheritDoc |
75 | 75 | * |
76 | - * @param iterable $keys List of key strings that identify the cache entries that should be removed |
|
76 | + * @param string[] $keys List of key strings that identify the cache entries that should be removed |
|
77 | 77 | * @return bool True if the items were successfully removed. False if there was an error. |
78 | 78 | * @throws \Psr\SimpleCache\InvalidArgumentException |
79 | 79 | */ |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @inheritDoc |
94 | 94 | * |
95 | - * @param iterable $tags List of tag strings that are associated to one or more cache entries that should be removed |
|
95 | + * @param string[] $tags List of tag strings that are associated to one or more cache entries that should be removed |
|
96 | 96 | * @return bool True if the items were successfully removed. False if there was an error. |
97 | 97 | * @throws \Psr\SimpleCache\InvalidArgumentException |
98 | 98 | */ |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | * @inheritDoc |
109 | 109 | * |
110 | 110 | * @param string $key Path to the requested value like product/id/123 |
111 | - * @param mixed $default Value returned if requested key isn't found |
|
111 | + * @param string $default Value returned if requested key isn't found |
|
112 | 112 | * @return mixed Value associated to the requested key. If no value for the |
113 | 113 | * key is found in the cache, the given default value is returned |
114 | 114 | * @throws \Psr\SimpleCache\InvalidArgumentException |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * |
129 | 129 | * @inheritDoc |
130 | 130 | * |
131 | - * @param iterable $keys List of key strings for the requested cache entries |
|
131 | + * @param string[] $keys List of key strings for the requested cache entries |
|
132 | 132 | * @param mixed $default Default value to return for keys that do not exist |
133 | 133 | * @return iterable A list of key => value pairs. Cache keys that do not exist or are stale will have $default as value. |
134 | 134 | * @throws \Psr\SimpleCache\InvalidArgumentException |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | * @inheritDoc |
204 | 204 | * |
205 | 205 | * @param iterable $pairs Associative list of key/value pairs. Both must be a string |
206 | - * @param \DateInterval|int|string|null $expires Date interval object, |
|
206 | + * @param string $expires Date interval object, |
|
207 | 207 | * date/time string in "YYYY-MM-DD HH:mm:ss" format or as integer TTL value |
208 | 208 | * when the cache entry will expiry |
209 | 209 | * @param iterable $tags List of tags that should be associated to the cache entries |