@@ -6,38 +6,38 @@ |
||
6 | 6 | $baseDir = $vendorDir; |
7 | 7 | |
8 | 8 | return array( |
9 | - 'OCA\\Files_Trashbin\\AppInfo\\Application' => $baseDir . '/../lib/AppInfo/Application.php', |
|
10 | - 'OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash' => $baseDir . '/../lib/BackgroundJob/ExpireTrash.php', |
|
11 | - 'OCA\\Files_Trashbin\\Capabilities' => $baseDir . '/../lib/Capabilities.php', |
|
12 | - 'OCA\\Files_Trashbin\\Command\\CleanUp' => $baseDir . '/../lib/Command/CleanUp.php', |
|
13 | - 'OCA\\Files_Trashbin\\Command\\Expire' => $baseDir . '/../lib/Command/Expire.php', |
|
14 | - 'OCA\\Files_Trashbin\\Command\\ExpireTrash' => $baseDir . '/../lib/Command/ExpireTrash.php', |
|
15 | - 'OCA\\Files_Trashbin\\Controller\\PreviewController' => $baseDir . '/../lib/Controller/PreviewController.php', |
|
16 | - 'OCA\\Files_Trashbin\\Events\\MoveToTrashEvent' => $baseDir . '/../lib/Events/MoveToTrashEvent.php', |
|
17 | - 'OCA\\Files_Trashbin\\Exceptions\\CopyRecursiveException' => $baseDir . '/../lib/Exceptions/CopyRecursiveException.php', |
|
18 | - 'OCA\\Files_Trashbin\\Expiration' => $baseDir . '/../lib/Expiration.php', |
|
19 | - 'OCA\\Files_Trashbin\\Helper' => $baseDir . '/../lib/Helper.php', |
|
20 | - 'OCA\\Files_Trashbin\\Hooks' => $baseDir . '/../lib/Hooks.php', |
|
21 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => $baseDir . '/../lib/Sabre/AbstractTrash.php', |
|
22 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => $baseDir . '/../lib/Sabre/AbstractTrashFile.php', |
|
23 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => $baseDir . '/../lib/Sabre/AbstractTrashFolder.php', |
|
24 | - 'OCA\\Files_Trashbin\\Sabre\\ITrash' => $baseDir . '/../lib/Sabre/ITrash.php', |
|
25 | - 'OCA\\Files_Trashbin\\Sabre\\PropfindPlugin' => $baseDir . '/../lib/Sabre/PropfindPlugin.php', |
|
26 | - 'OCA\\Files_Trashbin\\Sabre\\RestoreFolder' => $baseDir . '/../lib/Sabre/RestoreFolder.php', |
|
27 | - 'OCA\\Files_Trashbin\\Sabre\\RootCollection' => $baseDir . '/../lib/Sabre/RootCollection.php', |
|
28 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFile' => $baseDir . '/../lib/Sabre/TrashFile.php', |
|
29 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolder' => $baseDir . '/../lib/Sabre/TrashFolder.php', |
|
30 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFile' => $baseDir . '/../lib/Sabre/TrashFolderFile.php', |
|
31 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFolder' => $baseDir . '/../lib/Sabre/TrashFolderFolder.php', |
|
32 | - 'OCA\\Files_Trashbin\\Sabre\\TrashHome' => $baseDir . '/../lib/Sabre/TrashHome.php', |
|
33 | - 'OCA\\Files_Trashbin\\Sabre\\TrashRoot' => $baseDir . '/../lib/Sabre/TrashRoot.php', |
|
34 | - 'OCA\\Files_Trashbin\\Storage' => $baseDir . '/../lib/Storage.php', |
|
35 | - 'OCA\\Files_Trashbin\\Trash\\BackendNotFoundException' => $baseDir . '/../lib/Trash/BackendNotFoundException.php', |
|
36 | - 'OCA\\Files_Trashbin\\Trash\\ITrashBackend' => $baseDir . '/../lib/Trash/ITrashBackend.php', |
|
37 | - 'OCA\\Files_Trashbin\\Trash\\ITrashItem' => $baseDir . '/../lib/Trash/ITrashItem.php', |
|
38 | - 'OCA\\Files_Trashbin\\Trash\\ITrashManager' => $baseDir . '/../lib/Trash/ITrashManager.php', |
|
39 | - 'OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend' => $baseDir . '/../lib/Trash/LegacyTrashBackend.php', |
|
40 | - 'OCA\\Files_Trashbin\\Trash\\TrashItem' => $baseDir . '/../lib/Trash/TrashItem.php', |
|
41 | - 'OCA\\Files_Trashbin\\Trash\\TrashManager' => $baseDir . '/../lib/Trash/TrashManager.php', |
|
42 | - 'OCA\\Files_Trashbin\\Trashbin' => $baseDir . '/../lib/Trashbin.php', |
|
9 | + 'OCA\\Files_Trashbin\\AppInfo\\Application' => $baseDir.'/../lib/AppInfo/Application.php', |
|
10 | + 'OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash' => $baseDir.'/../lib/BackgroundJob/ExpireTrash.php', |
|
11 | + 'OCA\\Files_Trashbin\\Capabilities' => $baseDir.'/../lib/Capabilities.php', |
|
12 | + 'OCA\\Files_Trashbin\\Command\\CleanUp' => $baseDir.'/../lib/Command/CleanUp.php', |
|
13 | + 'OCA\\Files_Trashbin\\Command\\Expire' => $baseDir.'/../lib/Command/Expire.php', |
|
14 | + 'OCA\\Files_Trashbin\\Command\\ExpireTrash' => $baseDir.'/../lib/Command/ExpireTrash.php', |
|
15 | + 'OCA\\Files_Trashbin\\Controller\\PreviewController' => $baseDir.'/../lib/Controller/PreviewController.php', |
|
16 | + 'OCA\\Files_Trashbin\\Events\\MoveToTrashEvent' => $baseDir.'/../lib/Events/MoveToTrashEvent.php', |
|
17 | + 'OCA\\Files_Trashbin\\Exceptions\\CopyRecursiveException' => $baseDir.'/../lib/Exceptions/CopyRecursiveException.php', |
|
18 | + 'OCA\\Files_Trashbin\\Expiration' => $baseDir.'/../lib/Expiration.php', |
|
19 | + 'OCA\\Files_Trashbin\\Helper' => $baseDir.'/../lib/Helper.php', |
|
20 | + 'OCA\\Files_Trashbin\\Hooks' => $baseDir.'/../lib/Hooks.php', |
|
21 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => $baseDir.'/../lib/Sabre/AbstractTrash.php', |
|
22 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => $baseDir.'/../lib/Sabre/AbstractTrashFile.php', |
|
23 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => $baseDir.'/../lib/Sabre/AbstractTrashFolder.php', |
|
24 | + 'OCA\\Files_Trashbin\\Sabre\\ITrash' => $baseDir.'/../lib/Sabre/ITrash.php', |
|
25 | + 'OCA\\Files_Trashbin\\Sabre\\PropfindPlugin' => $baseDir.'/../lib/Sabre/PropfindPlugin.php', |
|
26 | + 'OCA\\Files_Trashbin\\Sabre\\RestoreFolder' => $baseDir.'/../lib/Sabre/RestoreFolder.php', |
|
27 | + 'OCA\\Files_Trashbin\\Sabre\\RootCollection' => $baseDir.'/../lib/Sabre/RootCollection.php', |
|
28 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFile' => $baseDir.'/../lib/Sabre/TrashFile.php', |
|
29 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolder' => $baseDir.'/../lib/Sabre/TrashFolder.php', |
|
30 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFile' => $baseDir.'/../lib/Sabre/TrashFolderFile.php', |
|
31 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFolder' => $baseDir.'/../lib/Sabre/TrashFolderFolder.php', |
|
32 | + 'OCA\\Files_Trashbin\\Sabre\\TrashHome' => $baseDir.'/../lib/Sabre/TrashHome.php', |
|
33 | + 'OCA\\Files_Trashbin\\Sabre\\TrashRoot' => $baseDir.'/../lib/Sabre/TrashRoot.php', |
|
34 | + 'OCA\\Files_Trashbin\\Storage' => $baseDir.'/../lib/Storage.php', |
|
35 | + 'OCA\\Files_Trashbin\\Trash\\BackendNotFoundException' => $baseDir.'/../lib/Trash/BackendNotFoundException.php', |
|
36 | + 'OCA\\Files_Trashbin\\Trash\\ITrashBackend' => $baseDir.'/../lib/Trash/ITrashBackend.php', |
|
37 | + 'OCA\\Files_Trashbin\\Trash\\ITrashItem' => $baseDir.'/../lib/Trash/ITrashItem.php', |
|
38 | + 'OCA\\Files_Trashbin\\Trash\\ITrashManager' => $baseDir.'/../lib/Trash/ITrashManager.php', |
|
39 | + 'OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend' => $baseDir.'/../lib/Trash/LegacyTrashBackend.php', |
|
40 | + 'OCA\\Files_Trashbin\\Trash\\TrashItem' => $baseDir.'/../lib/Trash/TrashItem.php', |
|
41 | + 'OCA\\Files_Trashbin\\Trash\\TrashManager' => $baseDir.'/../lib/Trash/TrashManager.php', |
|
42 | + 'OCA\\Files_Trashbin\\Trashbin' => $baseDir.'/../lib/Trashbin.php', |
|
43 | 43 | ); |
@@ -6,60 +6,60 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInitFiles_Trashbin |
8 | 8 | { |
9 | - public static $prefixLengthsPsr4 = array ( |
|
9 | + public static $prefixLengthsPsr4 = array( |
|
10 | 10 | 'O' => |
11 | - array ( |
|
11 | + array( |
|
12 | 12 | 'OCA\\Files_Trashbin\\' => 19, |
13 | 13 | ), |
14 | 14 | ); |
15 | 15 | |
16 | - public static $prefixDirsPsr4 = array ( |
|
16 | + public static $prefixDirsPsr4 = array( |
|
17 | 17 | 'OCA\\Files_Trashbin\\' => |
18 | - array ( |
|
19 | - 0 => __DIR__ . '/..' . '/../lib', |
|
18 | + array( |
|
19 | + 0 => __DIR__.'/..'.'/../lib', |
|
20 | 20 | ), |
21 | 21 | ); |
22 | 22 | |
23 | - public static $classMap = array ( |
|
24 | - 'OCA\\Files_Trashbin\\AppInfo\\Application' => __DIR__ . '/..' . '/../lib/AppInfo/Application.php', |
|
25 | - 'OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash' => __DIR__ . '/..' . '/../lib/BackgroundJob/ExpireTrash.php', |
|
26 | - 'OCA\\Files_Trashbin\\Capabilities' => __DIR__ . '/..' . '/../lib/Capabilities.php', |
|
27 | - 'OCA\\Files_Trashbin\\Command\\CleanUp' => __DIR__ . '/..' . '/../lib/Command/CleanUp.php', |
|
28 | - 'OCA\\Files_Trashbin\\Command\\Expire' => __DIR__ . '/..' . '/../lib/Command/Expire.php', |
|
29 | - 'OCA\\Files_Trashbin\\Command\\ExpireTrash' => __DIR__ . '/..' . '/../lib/Command/ExpireTrash.php', |
|
30 | - 'OCA\\Files_Trashbin\\Controller\\PreviewController' => __DIR__ . '/..' . '/../lib/Controller/PreviewController.php', |
|
31 | - 'OCA\\Files_Trashbin\\Events\\MoveToTrashEvent' => __DIR__ . '/..' . '/../lib/Events/MoveToTrashEvent.php', |
|
32 | - 'OCA\\Files_Trashbin\\Exceptions\\CopyRecursiveException' => __DIR__ . '/..' . '/../lib/Exceptions/CopyRecursiveException.php', |
|
33 | - 'OCA\\Files_Trashbin\\Expiration' => __DIR__ . '/..' . '/../lib/Expiration.php', |
|
34 | - 'OCA\\Files_Trashbin\\Helper' => __DIR__ . '/..' . '/../lib/Helper.php', |
|
35 | - 'OCA\\Files_Trashbin\\Hooks' => __DIR__ . '/..' . '/../lib/Hooks.php', |
|
36 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrash.php', |
|
37 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrashFile.php', |
|
38 | - 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => __DIR__ . '/..' . '/../lib/Sabre/AbstractTrashFolder.php', |
|
39 | - 'OCA\\Files_Trashbin\\Sabre\\ITrash' => __DIR__ . '/..' . '/../lib/Sabre/ITrash.php', |
|
40 | - 'OCA\\Files_Trashbin\\Sabre\\PropfindPlugin' => __DIR__ . '/..' . '/../lib/Sabre/PropfindPlugin.php', |
|
41 | - 'OCA\\Files_Trashbin\\Sabre\\RestoreFolder' => __DIR__ . '/..' . '/../lib/Sabre/RestoreFolder.php', |
|
42 | - 'OCA\\Files_Trashbin\\Sabre\\RootCollection' => __DIR__ . '/..' . '/../lib/Sabre/RootCollection.php', |
|
43 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFile' => __DIR__ . '/..' . '/../lib/Sabre/TrashFile.php', |
|
44 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolder' => __DIR__ . '/..' . '/../lib/Sabre/TrashFolder.php', |
|
45 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFile' => __DIR__ . '/..' . '/../lib/Sabre/TrashFolderFile.php', |
|
46 | - 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFolder' => __DIR__ . '/..' . '/../lib/Sabre/TrashFolderFolder.php', |
|
47 | - 'OCA\\Files_Trashbin\\Sabre\\TrashHome' => __DIR__ . '/..' . '/../lib/Sabre/TrashHome.php', |
|
48 | - 'OCA\\Files_Trashbin\\Sabre\\TrashRoot' => __DIR__ . '/..' . '/../lib/Sabre/TrashRoot.php', |
|
49 | - 'OCA\\Files_Trashbin\\Storage' => __DIR__ . '/..' . '/../lib/Storage.php', |
|
50 | - 'OCA\\Files_Trashbin\\Trash\\BackendNotFoundException' => __DIR__ . '/..' . '/../lib/Trash/BackendNotFoundException.php', |
|
51 | - 'OCA\\Files_Trashbin\\Trash\\ITrashBackend' => __DIR__ . '/..' . '/../lib/Trash/ITrashBackend.php', |
|
52 | - 'OCA\\Files_Trashbin\\Trash\\ITrashItem' => __DIR__ . '/..' . '/../lib/Trash/ITrashItem.php', |
|
53 | - 'OCA\\Files_Trashbin\\Trash\\ITrashManager' => __DIR__ . '/..' . '/../lib/Trash/ITrashManager.php', |
|
54 | - 'OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend' => __DIR__ . '/..' . '/../lib/Trash/LegacyTrashBackend.php', |
|
55 | - 'OCA\\Files_Trashbin\\Trash\\TrashItem' => __DIR__ . '/..' . '/../lib/Trash/TrashItem.php', |
|
56 | - 'OCA\\Files_Trashbin\\Trash\\TrashManager' => __DIR__ . '/..' . '/../lib/Trash/TrashManager.php', |
|
57 | - 'OCA\\Files_Trashbin\\Trashbin' => __DIR__ . '/..' . '/../lib/Trashbin.php', |
|
23 | + public static $classMap = array( |
|
24 | + 'OCA\\Files_Trashbin\\AppInfo\\Application' => __DIR__.'/..'.'/../lib/AppInfo/Application.php', |
|
25 | + 'OCA\\Files_Trashbin\\BackgroundJob\\ExpireTrash' => __DIR__.'/..'.'/../lib/BackgroundJob/ExpireTrash.php', |
|
26 | + 'OCA\\Files_Trashbin\\Capabilities' => __DIR__.'/..'.'/../lib/Capabilities.php', |
|
27 | + 'OCA\\Files_Trashbin\\Command\\CleanUp' => __DIR__.'/..'.'/../lib/Command/CleanUp.php', |
|
28 | + 'OCA\\Files_Trashbin\\Command\\Expire' => __DIR__.'/..'.'/../lib/Command/Expire.php', |
|
29 | + 'OCA\\Files_Trashbin\\Command\\ExpireTrash' => __DIR__.'/..'.'/../lib/Command/ExpireTrash.php', |
|
30 | + 'OCA\\Files_Trashbin\\Controller\\PreviewController' => __DIR__.'/..'.'/../lib/Controller/PreviewController.php', |
|
31 | + 'OCA\\Files_Trashbin\\Events\\MoveToTrashEvent' => __DIR__.'/..'.'/../lib/Events/MoveToTrashEvent.php', |
|
32 | + 'OCA\\Files_Trashbin\\Exceptions\\CopyRecursiveException' => __DIR__.'/..'.'/../lib/Exceptions/CopyRecursiveException.php', |
|
33 | + 'OCA\\Files_Trashbin\\Expiration' => __DIR__.'/..'.'/../lib/Expiration.php', |
|
34 | + 'OCA\\Files_Trashbin\\Helper' => __DIR__.'/..'.'/../lib/Helper.php', |
|
35 | + 'OCA\\Files_Trashbin\\Hooks' => __DIR__.'/..'.'/../lib/Hooks.php', |
|
36 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrash' => __DIR__.'/..'.'/../lib/Sabre/AbstractTrash.php', |
|
37 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFile' => __DIR__.'/..'.'/../lib/Sabre/AbstractTrashFile.php', |
|
38 | + 'OCA\\Files_Trashbin\\Sabre\\AbstractTrashFolder' => __DIR__.'/..'.'/../lib/Sabre/AbstractTrashFolder.php', |
|
39 | + 'OCA\\Files_Trashbin\\Sabre\\ITrash' => __DIR__.'/..'.'/../lib/Sabre/ITrash.php', |
|
40 | + 'OCA\\Files_Trashbin\\Sabre\\PropfindPlugin' => __DIR__.'/..'.'/../lib/Sabre/PropfindPlugin.php', |
|
41 | + 'OCA\\Files_Trashbin\\Sabre\\RestoreFolder' => __DIR__.'/..'.'/../lib/Sabre/RestoreFolder.php', |
|
42 | + 'OCA\\Files_Trashbin\\Sabre\\RootCollection' => __DIR__.'/..'.'/../lib/Sabre/RootCollection.php', |
|
43 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFile' => __DIR__.'/..'.'/../lib/Sabre/TrashFile.php', |
|
44 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolder' => __DIR__.'/..'.'/../lib/Sabre/TrashFolder.php', |
|
45 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFile' => __DIR__.'/..'.'/../lib/Sabre/TrashFolderFile.php', |
|
46 | + 'OCA\\Files_Trashbin\\Sabre\\TrashFolderFolder' => __DIR__.'/..'.'/../lib/Sabre/TrashFolderFolder.php', |
|
47 | + 'OCA\\Files_Trashbin\\Sabre\\TrashHome' => __DIR__.'/..'.'/../lib/Sabre/TrashHome.php', |
|
48 | + 'OCA\\Files_Trashbin\\Sabre\\TrashRoot' => __DIR__.'/..'.'/../lib/Sabre/TrashRoot.php', |
|
49 | + 'OCA\\Files_Trashbin\\Storage' => __DIR__.'/..'.'/../lib/Storage.php', |
|
50 | + 'OCA\\Files_Trashbin\\Trash\\BackendNotFoundException' => __DIR__.'/..'.'/../lib/Trash/BackendNotFoundException.php', |
|
51 | + 'OCA\\Files_Trashbin\\Trash\\ITrashBackend' => __DIR__.'/..'.'/../lib/Trash/ITrashBackend.php', |
|
52 | + 'OCA\\Files_Trashbin\\Trash\\ITrashItem' => __DIR__.'/..'.'/../lib/Trash/ITrashItem.php', |
|
53 | + 'OCA\\Files_Trashbin\\Trash\\ITrashManager' => __DIR__.'/..'.'/../lib/Trash/ITrashManager.php', |
|
54 | + 'OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend' => __DIR__.'/..'.'/../lib/Trash/LegacyTrashBackend.php', |
|
55 | + 'OCA\\Files_Trashbin\\Trash\\TrashItem' => __DIR__.'/..'.'/../lib/Trash/TrashItem.php', |
|
56 | + 'OCA\\Files_Trashbin\\Trash\\TrashManager' => __DIR__.'/..'.'/../lib/Trash/TrashManager.php', |
|
57 | + 'OCA\\Files_Trashbin\\Trashbin' => __DIR__.'/..'.'/../lib/Trashbin.php', |
|
58 | 58 | ); |
59 | 59 | |
60 | 60 | public static function getInitializer(ClassLoader $loader) |
61 | 61 | { |
62 | - return \Closure::bind(function () use ($loader) { |
|
62 | + return \Closure::bind(function() use ($loader) { |
|
63 | 63 | $loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Trashbin::$prefixLengthsPsr4; |
64 | 64 | $loader->prefixDirsPsr4 = ComposerStaticInitFiles_Trashbin::$prefixDirsPsr4; |
65 | 65 | $loader->classMap = ComposerStaticInitFiles_Trashbin::$classMap; |
@@ -77,14 +77,14 @@ discard block |
||
77 | 77 | |
78 | 78 | // Check if the app is installed |
79 | 79 | if (!\OC_App::getAppPath($appId)) { |
80 | - $output->writeln($appId . ' is not installed'); |
|
80 | + $output->writeln($appId.' is not installed'); |
|
81 | 81 | return 1; |
82 | 82 | } |
83 | 83 | |
84 | 84 | // Removing shipped apps is not possible, therefore we pre-check that |
85 | 85 | // before trying to remove it |
86 | 86 | if ($this->manager->isShipped($appId)) { |
87 | - $output->writeln($appId . ' could not be removed as it is a shipped app'); |
|
87 | + $output->writeln($appId.' could not be removed as it is a shipped app'); |
|
88 | 88 | return 1; |
89 | 89 | } |
90 | 90 | |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | if (!$input->getOption('keep-data')) { |
94 | 94 | try { |
95 | 95 | $this->manager->disableApp($appId); |
96 | - $output->writeln($appId . ' disabled'); |
|
97 | - } catch(Throwable $e) { |
|
98 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
96 | + $output->writeln($appId.' disabled'); |
|
97 | + } catch (Throwable $e) { |
|
98 | + $output->writeln('<error>Error: '.$e->getMessage().'</error>'); |
|
99 | 99 | $this->logger->logException($e, [ |
100 | 100 | 'app' => 'CLI', |
101 | 101 | 'level' => ILogger::ERROR |
@@ -107,8 +107,8 @@ discard block |
||
107 | 107 | // Let's try to remove the app... |
108 | 108 | try { |
109 | 109 | $result = $this->installer->removeApp($appId); |
110 | - } catch(Throwable $e) { |
|
111 | - $output->writeln('<error>Error: ' . $e->getMessage() . '</error>'); |
|
110 | + } catch (Throwable $e) { |
|
111 | + $output->writeln('<error>Error: '.$e->getMessage().'</error>'); |
|
112 | 112 | $this->logger->logException($e, [ |
113 | 113 | 'app' => 'CLI', |
114 | 114 | 'level' => ILogger::ERROR |
@@ -116,12 +116,12 @@ discard block |
||
116 | 116 | return 1; |
117 | 117 | } |
118 | 118 | |
119 | - if($result === false) { |
|
120 | - $output->writeln($appId . ' could not be removed'); |
|
119 | + if ($result === false) { |
|
120 | + $output->writeln($appId.' could not be removed'); |
|
121 | 121 | return 1; |
122 | 122 | } |
123 | 123 | |
124 | - $output->writeln($appId . ' removed'); |
|
124 | + $output->writeln($appId.' removed'); |
|
125 | 125 | |
126 | 126 | return 0; |
127 | 127 | } |
@@ -95,8 +95,8 @@ |
||
95 | 95 | $emailAddress = $emailAddressData['value']; |
96 | 96 | $emailAddressType = $emailAddressData['type']; |
97 | 97 | } |
98 | - if (isset($contact['FN'])) { |
|
99 | - $displayName = $contact['FN'] . ' (' . $emailAddress . ')'; |
|
98 | + if (isset($contact['FN'])) { |
|
99 | + $displayName = $contact['FN'].' ('.$emailAddress.')'; |
|
100 | 100 | } |
101 | 101 | $exactEmailMatch = strtolower($emailAddress) === $lowerSearch; |
102 | 102 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | public function getChild($name) { |
72 | 72 | $userFolder = $this->rootFolder->getUserFolder($this->user->getUID()); |
73 | 73 | |
74 | - $fileId = (int)$name; |
|
74 | + $fileId = (int) $name; |
|
75 | 75 | $nodes = $userFolder->getById($fileId); |
76 | 76 | |
77 | 77 | if ($nodes === []) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | public function getETag(): string { |
63 | - return (string)$this->version->getRevisionId(); |
|
63 | + return (string) $this->version->getRevisionId(); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | public function getSize(): int { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | |
74 | 74 | public function getName(): string { |
75 | - return (string)$this->version->getRevisionId(); |
|
75 | + return (string) $this->version->getRevisionId(); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | public function setName($name) { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | public function getChildren(): array { |
79 | 79 | $versions = $this->versionManager->getVersionsForFile($this->user, $this->file); |
80 | 80 | |
81 | - return array_map(function (IVersion $version) { |
|
81 | + return array_map(function(IVersion $version) { |
|
82 | 82 | return new VersionFile($version, $this->versionManager); |
83 | 83 | }, $versions); |
84 | 84 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | } |
98 | 98 | |
99 | 99 | public function getName(): string { |
100 | - return (string)$this->file->getId(); |
|
100 | + return (string) $this->file->getId(); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | public function setName($name) { |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | try { |
84 | 84 | $this->manager->getAppPath($singleAppId); |
85 | 85 | } catch (\OCP\App\AppPathNotFoundException $e) { |
86 | - $output->writeln($singleAppId . ' not installed'); |
|
86 | + $output->writeln($singleAppId.' not installed'); |
|
87 | 87 | return 1; |
88 | 88 | } |
89 | 89 | |
@@ -98,22 +98,22 @@ discard block |
||
98 | 98 | foreach ($apps as $appId) { |
99 | 99 | $newVersion = $this->installer->isUpdateAvailable($appId); |
100 | 100 | if ($newVersion) { |
101 | - $output->writeln($appId . ' new version available: ' . $newVersion); |
|
101 | + $output->writeln($appId.' new version available: '.$newVersion); |
|
102 | 102 | |
103 | 103 | if (!$input->getOption('showonly')) { |
104 | 104 | try { |
105 | 105 | $result = $this->installer->updateAppstoreApp($appId); |
106 | - } catch(\Exception $e) { |
|
107 | - $this->logger->logException($e, ['message' => 'Failure during update of app "' . $appId . '"','app' => 'app:update']); |
|
108 | - $output->writeln('Error: ' . $e->getMessage()); |
|
106 | + } catch (\Exception $e) { |
|
107 | + $this->logger->logException($e, ['message' => 'Failure during update of app "'.$appId.'"', 'app' => 'app:update']); |
|
108 | + $output->writeln('Error: '.$e->getMessage()); |
|
109 | 109 | $return = 1; |
110 | 110 | } |
111 | 111 | |
112 | 112 | if ($result === false) { |
113 | - $output->writeln($appId . ' couldn\'t be updated'); |
|
113 | + $output->writeln($appId.' couldn\'t be updated'); |
|
114 | 114 | $return = 1; |
115 | - } else if($result === true) { |
|
116 | - $output->writeln($appId . ' updated'); |
|
115 | + } else if ($result === true) { |
|
116 | + $output->writeln($appId.' updated'); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | } |
@@ -170,12 +170,12 @@ discard block |
||
170 | 170 | */ |
171 | 171 | private function requiresCSRFCheck() { |
172 | 172 | // GET requires no check at all |
173 | - if($this->request->getMethod() === 'GET') { |
|
173 | + if ($this->request->getMethod() === 'GET') { |
|
174 | 174 | return false; |
175 | 175 | } |
176 | 176 | |
177 | 177 | // Official Nextcloud clients require no checks |
178 | - if($this->request->isUserAgent([ |
|
178 | + if ($this->request->isUserAgent([ |
|
179 | 179 | IRequest::USER_AGENT_CLIENT_DESKTOP, |
180 | 180 | IRequest::USER_AGENT_CLIENT_ANDROID, |
181 | 181 | IRequest::USER_AGENT_CLIENT_IOS, |
@@ -184,17 +184,17 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | // If not logged-in no check is required |
187 | - if(!$this->userSession->isLoggedIn()) { |
|
187 | + if (!$this->userSession->isLoggedIn()) { |
|
188 | 188 | return false; |
189 | 189 | } |
190 | 190 | |
191 | 191 | // POST always requires a check |
192 | - if($this->request->getMethod() === 'POST') { |
|
192 | + if ($this->request->getMethod() === 'POST') { |
|
193 | 193 | return true; |
194 | 194 | } |
195 | 195 | |
196 | 196 | // If logged-in AND DAV authenticated no check is required |
197 | - if($this->userSession->isLoggedIn() && |
|
197 | + if ($this->userSession->isLoggedIn() && |
|
198 | 198 | $this->isDavAuthenticated($this->userSession->getUser()->getUID())) { |
199 | 199 | return false; |
200 | 200 | } |
@@ -211,10 +211,10 @@ discard block |
||
211 | 211 | private function auth(RequestInterface $request, ResponseInterface $response) { |
212 | 212 | $forcedLogout = false; |
213 | 213 | |
214 | - if(!$this->request->passesCSRFCheck() && |
|
214 | + if (!$this->request->passesCSRFCheck() && |
|
215 | 215 | $this->requiresCSRFCheck()) { |
216 | 216 | // In case of a fail with POST we need to recheck the credentials |
217 | - if($this->request->getMethod() === 'POST') { |
|
217 | + if ($this->request->getMethod() === 'POST') { |
|
218 | 218 | $forcedLogout = true; |
219 | 219 | } else { |
220 | 220 | $response->setStatus(401); |
@@ -222,10 +222,10 @@ discard block |
||
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
225 | - if($forcedLogout) { |
|
225 | + if ($forcedLogout) { |
|
226 | 226 | $this->userSession->logout(); |
227 | 227 | } else { |
228 | - if($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { |
|
228 | + if ($this->twoFactorManager->needsSecondFactor($this->userSession->getUser())) { |
|
229 | 229 | throw new \Sabre\DAV\Exception\NotAuthenticated('2FA challenge not passed.'); |
230 | 230 | } |
231 | 231 | if ( |
@@ -239,19 +239,19 @@ discard block |
||
239 | 239 | \OC_Util::setupFS($user); |
240 | 240 | $this->currentUser = $user; |
241 | 241 | $this->session->close(); |
242 | - return [true, $this->principalPrefix . $user]; |
|
242 | + return [true, $this->principalPrefix.$user]; |
|
243 | 243 | } |
244 | 244 | } |
245 | 245 | |
246 | 246 | if (!$this->userSession->isLoggedIn() && in_array('XMLHttpRequest', explode(',', $request->getHeader('X-Requested-With')))) { |
247 | 247 | // do not re-authenticate over ajax, use dummy auth name to prevent browser popup |
248 | - $response->addHeader('WWW-Authenticate','DummyBasic realm="' . $this->realm . '"'); |
|
248 | + $response->addHeader('WWW-Authenticate', 'DummyBasic realm="'.$this->realm.'"'); |
|
249 | 249 | $response->setStatus(401); |
250 | 250 | throw new \Sabre\DAV\Exception\NotAuthenticated('Cannot authenticate over ajax calls'); |
251 | 251 | } |
252 | 252 | |
253 | 253 | $data = parent::check($request, $response); |
254 | - if($data[0] === true) { |
|
254 | + if ($data[0] === true) { |
|
255 | 255 | $startPos = strrpos($data[1], '/') + 1; |
256 | 256 | $user = $this->userSession->getUser()->getUID(); |
257 | 257 | $data[1] = substr_replace($data[1], $user, $startPos); |