@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | public function get(string $filename) |
| 89 | 89 | { |
| 90 | 90 | try { |
| 91 | - return (string)$this->dropboxApp->contentRequest(DropboxApp::ENDPOINT_DOWNLOAD_FILE, $this->dropboxApp->path($filename)); |
|
| 91 | + return (string) $this->dropboxApp->contentRequest(DropboxApp::ENDPOINT_DOWNLOAD_FILE, $this->dropboxApp->path($filename)); |
|
| 92 | 92 | } catch (Exception $e) { |
| 93 | 93 | return false; |
| 94 | 94 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | public function size(string $filename) |
| 169 | 169 | { |
| 170 | 170 | try { |
| 171 | - $meta = (array)$this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 171 | + $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 172 | 172 | return $meta['size']; |
| 173 | 173 | } catch (Exception $e) { |
| 174 | 174 | return false; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | public function lastModified(string $filename) |
| 182 | 182 | { |
| 183 | 183 | try { |
| 184 | - $meta = (array)$this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 184 | + $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 185 | 185 | return isset($meta['server_modified']) ? strtotime($meta['server_modified']) : false; |
| 186 | 186 | } catch (Exception $e) { |
| 187 | 187 | return false; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | public function isFile(string $filename): bool |
| 210 | 210 | { |
| 211 | 211 | try { |
| 212 | - $meta = (array)$this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 212 | + $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($filename)); |
|
| 213 | 213 | return $meta['.tag'] == 'file'; |
| 214 | 214 | } catch (Exception $e) { |
| 215 | 215 | return false; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | public function isDirectory(string $dirname): bool |
| 224 | 224 | { |
| 225 | 225 | try { |
| 226 | - $meta = (array)$this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($dirname)); |
|
| 226 | + $meta = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_FILE_METADATA, $this->dropboxApp->path($dirname)); |
|
| 227 | 227 | return $meta['.tag'] == 'folder'; |
| 228 | 228 | } catch (Exception $e) { |
| 229 | 229 | return false; |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | public function listDirectory(string $dirname) |
| 237 | 237 | { |
| 238 | 238 | try { |
| 239 | - $response = (array)$this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_LIST_FOLDER, $this->dropboxApp->path($dirname)); |
|
| 239 | + $response = (array) $this->dropboxApp->rpcRequest(DropboxApp::ENDPOINT_LIST_FOLDER, $this->dropboxApp->path($dirname)); |
|
| 240 | 240 | return $response['entries']; |
| 241 | 241 | } catch (Exception $e) { |
| 242 | 242 | return false; |
@@ -85,7 +85,7 @@ |
||
| 85 | 85 | */ |
| 86 | 86 | private function generateRandomKey(): string |
| 87 | 87 | { |
| 88 | - return bin2hex(random_bytes((int)$this->getOption('length'))); |
|
| 88 | + return bin2hex(random_bytes((int) $this->getOption('length'))); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | } |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | ]; |
| 99 | 99 | |
| 100 | 100 | if (isset($this->moduleOptions['cacheable'])) { |
| 101 | - $this->currentRoute['cache_settings']['shouldCache'] = (bool)$this->moduleOptions['cacheable']; |
|
| 101 | + $this->currentRoute['cache_settings']['shouldCache'] = (bool) $this->moduleOptions['cacheable']; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | if (is_callable($params[0])) { |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | { |
| 99 | 99 | $this->client = new MultiCurl(); |
| 100 | 100 | |
| 101 | - $this->client->complete(function (Curl $instance) { |
|
| 101 | + $this->client->complete(function(Curl $instance) { |
|
| 102 | 102 | $this->handleResponse($instance); |
| 103 | 103 | }); |
| 104 | 104 | |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function select(...$columns): DbalInterface |
| 33 | 33 | { |
| 34 | - array_walk($columns, function (&$column) { |
|
| 34 | + array_walk($columns, function(&$column) { |
|
| 35 | 35 | if (is_array($column)) { |
| 36 | 36 | $column = array_flip($column); |
| 37 | 37 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function select(...$columns): DbalInterface |
| 33 | 33 | { |
| 34 | - array_walk($columns, function (&$column) { |
|
| 34 | + array_walk($columns, function(&$column) { |
|
| 35 | 35 | if (is_array($column)) { |
| 36 | 36 | $column = array_flip($column); |
| 37 | 37 | } |
@@ -158,7 +158,7 @@ |
||
| 158 | 158 | */ |
| 159 | 159 | public function fetchData(): ?array |
| 160 | 160 | { |
| 161 | - return isset($this->fetchedPayload->data) ? (array)$this->fetchedPayload->data : null; |
|
| 161 | + return isset($this->fetchedPayload->data) ? (array) $this->fetchedPayload->data : null; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | /** |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function get(): array |
| 32 | 32 | { |
| 33 | - return array_map(function ($element) { |
|
| 33 | + return array_map(function($element) { |
|
| 34 | 34 | $item = clone $this; |
| 35 | 35 | $item->updateOrmModel($element); |
| 36 | 36 | return $item; |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | */ |
| 138 | 138 | public function lastPageNumber(): int |
| 139 | 139 | { |
| 140 | - return (int)ceil($this->total() / $this->perPage); |
|
| 140 | + return (int) ceil($this->total() / $this->perPage); |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |