@@ -24,7 +24,6 @@ |
||
24 | 24 | |
25 | 25 | namespace OCA\CMSPico\Exceptions; |
26 | 26 | |
27 | -class FilesystemNotLocalException extends \Exception |
|
28 | -{ |
|
27 | +class FilesystemNotLocalException extends \Exception { |
|
29 | 28 | |
30 | 29 | } |
@@ -28,8 +28,7 @@ |
||
28 | 28 | use OCP\Files\InvalidPathException; |
29 | 29 | use OCP\Files\NotPermittedException; |
30 | 30 | |
31 | -trait FolderTrait |
|
32 | -{ |
|
31 | +trait FolderTrait { |
|
33 | 32 | /** @var \Generator */ |
34 | 33 | private $generator; |
35 | 34 |
@@ -27,8 +27,7 @@ |
||
27 | 27 | use OCP\Files\File as OCFile; |
28 | 28 | use OCP\Files\InvalidPathException; |
29 | 29 | |
30 | -class StorageFile extends AbstractStorageNode implements FileInterface |
|
31 | -{ |
|
30 | +class StorageFile extends AbstractStorageNode implements FileInterface { |
|
32 | 31 | /** @var OCFile */ |
33 | 32 | protected $node; |
34 | 33 |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | private function init() |
52 | 52 | { |
53 | - $this->folders = [ $this->folder ]; |
|
53 | + $this->folders = [$this->folder]; |
|
54 | 54 | $this->current = $this->folder; |
55 | 55 | $this->depth = 0; |
56 | 56 |
@@ -8,8 +8,7 @@ |
||
8 | 8 | use OCP\Files\GenericFileException; |
9 | 9 | use OCP\Files\NotPermittedException; |
10 | 10 | |
11 | -class GlobIterator implements \Iterator |
|
12 | -{ |
|
11 | +class GlobIterator implements \Iterator { |
|
13 | 12 | /** @var FolderInterface */ |
14 | 13 | private $folder; |
15 | 14 |
@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | protected $delimiter = '~'; |
40 | 40 | |
41 | 41 | /** @var string[] */ |
42 | - protected $functionChars = [ '*', '?', '[' ]; |
|
42 | + protected $functionChars = ['*', '?', '[']; |
|
43 | 43 | |
44 | 44 | /** @var string[] */ |
45 | - protected $specialChars = [ '*', '?', '[', ']', '-', '\\' ]; |
|
45 | + protected $specialChars = ['*', '?', '[', ']', '-', '\\']; |
|
46 | 46 | |
47 | 47 | /** @var string[] */ |
48 | - protected $escapeChars = [ '.', '+', '^', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', '#', '~' ]; |
|
48 | + protected $escapeChars = ['.', '+', '^', '$', '(', ')', '{', '}', '=', '!', '<', '>', '|', ':', '#', '~']; |
|
49 | 49 | |
50 | 50 | /** @var string */ |
51 | 51 | protected $pattern; |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | if ($componentType === self::TYPE_STATIC) { |
92 | 92 | return ($fileName === $componentPattern); |
93 | 93 | } elseif ($componentType === self::TYPE_REGEX) { |
94 | - return (bool) preg_match($componentPattern, $fileName); |
|
94 | + return (bool)preg_match($componentPattern, $fileName); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | return false; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | { |
107 | 107 | while (!isset($this->components[$depth])) { |
108 | 108 | if ($this->patternPos === $this->patternLength) { |
109 | - return [ self::TYPE_NONE, '' ]; |
|
109 | + return [self::TYPE_NONE, '']; |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | $this->evaluateComponent(); |
@@ -212,10 +212,10 @@ discard block |
||
212 | 212 | } |
213 | 213 | |
214 | 214 | if ($this->context['isStatic']) { |
215 | - $this->components[] = [ self::TYPE_STATIC, $this->current ]; |
|
215 | + $this->components[] = [self::TYPE_STATIC, $this->current]; |
|
216 | 216 | } else { |
217 | 217 | $regex = $this->delimiter . '^' . $this->current . '$' . $this->delimiter; |
218 | - $this->components[] = [ self::TYPE_REGEX, $regex ]; |
|
218 | + $this->components[] = [self::TYPE_REGEX, $regex]; |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 |
@@ -24,8 +24,7 @@ |
||
24 | 24 | |
25 | 25 | namespace OCA\CMSPico\Files\Glob; |
26 | 26 | |
27 | -class GlobPattern |
|
28 | -{ |
|
27 | +class GlobPattern { |
|
29 | 28 | /** @var int */ |
30 | 29 | const TYPE_NONE = 0; |
31 | 30 |
@@ -35,8 +35,7 @@ |
||
35 | 35 | use OCP\ILogger; |
36 | 36 | use OCP\ITempManager; |
37 | 37 | |
38 | -class StorageFolder extends AbstractStorageNode implements FolderInterface |
|
39 | -{ |
|
38 | +class StorageFolder extends AbstractStorageNode implements FolderInterface { |
|
40 | 39 | use FolderTrait; |
41 | 40 | |
42 | 41 | /** @var array<string,string> */ |
@@ -127,7 +127,7 @@ |
||
127 | 127 | */ |
128 | 128 | public function getPermissions(): int |
129 | 129 | { |
130 | - return Constants::PERMISSION_READ | Constants::PERMISSION_DELETE; |
|
130 | + return Constants::PERMISSION_READ|Constants::PERMISSION_DELETE; |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | /** |
@@ -35,8 +35,7 @@ |
||
35 | 35 | use OCP\Files\NotFoundException; |
36 | 36 | use OCP\Files\NotPermittedException; |
37 | 37 | |
38 | -class TemplateFile extends AbstractNode implements FileInterface |
|
39 | -{ |
|
38 | +class TemplateFile extends AbstractNode implements FileInterface { |
|
40 | 39 | /** @var FileInterface */ |
41 | 40 | private $file; |
42 | 41 |
@@ -37,8 +37,7 @@ |
||
37 | 37 | use OCP\Files\NotFoundException; |
38 | 38 | use OCP\Files\NotPermittedException; |
39 | 39 | |
40 | -class AssetsService |
|
41 | -{ |
|
40 | +class AssetsService { |
|
42 | 41 | /** |
43 | 42 | * @param Website $website |
44 | 43 | * |
@@ -29,8 +29,7 @@ |
||
29 | 29 | use OCP\Files\NotPermittedException; |
30 | 30 | use OCP\Security\ISecureRandom; |
31 | 31 | |
32 | -class MiscService |
|
33 | -{ |
|
32 | +class MiscService { |
|
34 | 33 | /** @var string[] */ |
35 | 34 | private $textFileMagic; |
36 | 35 |