@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | public function makeDirectory(string $dirname, ?string $parentId = null): bool |
| 44 | 44 | { |
| 45 | - try{ |
|
| 45 | + try { |
|
| 46 | 46 | $data = [ |
| 47 | 47 | 'name' => $dirname, |
| 48 | 48 | 'mimeType' => GoogleDriveApp::FOLDER_MIMETYPE, |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public function get(string $filename) |
| 71 | 71 | { |
| 72 | 72 | try { |
| 73 | - return (string)$this->googleDriveApp->getFileInfo($filename, true); |
|
| 73 | + return (string) $this->googleDriveApp->getFileInfo($filename, true); |
|
| 74 | 74 | } catch (Exception $e) { |
| 75 | 75 | return false; |
| 76 | 76 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | public function size(string $filename) |
| 173 | 173 | { |
| 174 | 174 | try { |
| 175 | - $meta = (array)$this->googleDriveApp->getFileInfo($filename); |
|
| 175 | + $meta = (array) $this->googleDriveApp->getFileInfo($filename); |
|
| 176 | 176 | return $meta['size']; |
| 177 | 177 | } catch (Exception $e) { |
| 178 | 178 | return false; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | public function lastModified(string $filename) |
| 186 | 186 | { |
| 187 | 187 | try { |
| 188 | - $meta = (array)$this->googleDriveApp->getFileInfo($filename); |
|
| 188 | + $meta = (array) $this->googleDriveApp->getFileInfo($filename); |
|
| 189 | 189 | return empty($meta['modifiedTime']) ? false : strtotime($meta['modifiedTime']); |
| 190 | 190 | } catch (Exception $e) { |
| 191 | 191 | return false; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | public function isFile(string $filename): bool |
| 214 | 214 | { |
| 215 | 215 | try { |
| 216 | - $meta = (array)$this->googleDriveApp->getFileInfo($filename); |
|
| 216 | + $meta = (array) $this->googleDriveApp->getFileInfo($filename); |
|
| 217 | 217 | |
| 218 | 218 | return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] != GoogleDriveApp::FOLDER_MIMETYPE; |
| 219 | 219 | } catch (Exception $e) { |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | public function isDirectory(string $dirname): bool |
| 228 | 228 | { |
| 229 | 229 | try { |
| 230 | - $meta = (array)$this->googleDriveApp->getFileInfo($dirname); |
|
| 230 | + $meta = (array) $this->googleDriveApp->getFileInfo($dirname); |
|
| 231 | 231 | |
| 232 | 232 | return $meta['kind'] === GoogleDriveApp::DRIVE_FILE_KIND && $meta['mimeType'] === GoogleDriveApp::FOLDER_MIMETYPE; |
| 233 | 233 | } catch (Exception $e) { |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | 'q' => "'$dirname' in parents and trashed = false", |
| 246 | 246 | 'fields' => '*' |
| 247 | 247 | ]; |
| 248 | - $response = (array)$this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '?' . http_build_query($params), [], 'GET'); |
|
| 248 | + $response = (array) $this->googleDriveApp->rpcRequest(GoogleDriveApp::FILE_METADATA_URL . '?' . http_build_query($params), [], 'GET'); |
|
| 249 | 249 | return $response["files"]; |
| 250 | 250 | } catch (Exception $e) { |
| 251 | 251 | return false; |