@@ -24,8 +24,7 @@ |
||
24 | 24 | |
25 | 25 | namespace OCA\CMSPico\Exceptions; |
26 | 26 | |
27 | -class AssetNotPermittedException extends \Exception |
|
28 | -{ |
|
27 | +class AssetNotPermittedException extends \Exception { |
|
29 | 28 | /** |
30 | 29 | * AssetNotPermittedException constructor. |
31 | 30 | * |
@@ -27,8 +27,7 @@ |
||
27 | 27 | |
28 | 28 | use OCA\CMSPico\Service\WebsitesService; |
29 | 29 | |
30 | -class UserEvents |
|
31 | -{ |
|
30 | +class UserEvents { |
|
32 | 31 | /** @var WebsitesService */ |
33 | 32 | private $websitesService; |
34 | 33 |
@@ -30,8 +30,7 @@ |
||
30 | 30 | use OCP\IURLGenerator; |
31 | 31 | use OCP\Settings\IIconSection; |
32 | 32 | |
33 | -class PersonalSection implements IIconSection |
|
34 | -{ |
|
33 | +class PersonalSection implements IIconSection { |
|
35 | 34 | /** @var IL10N */ |
36 | 35 | private $l10n; |
37 | 36 |
@@ -30,8 +30,7 @@ |
||
30 | 30 | use OCP\IURLGenerator; |
31 | 31 | use OCP\Settings\IIconSection; |
32 | 32 | |
33 | -class AdminSection implements IIconSection |
|
34 | -{ |
|
33 | +class AdminSection implements IIconSection { |
|
35 | 34 | /** @var IL10N */ |
36 | 35 | private $l10n; |
37 | 36 |
@@ -70,7 +70,7 @@ |
||
70 | 70 | $exampleProxyUrl = $this->urlGenerator->getBaseUrl() . '/sites/' . urlencode($exampleSite) . '/'; |
71 | 71 | $exampleFullUrl = $this->urlGenerator->linkToRouteAbsolute( |
72 | 72 | Application::APP_NAME . '.Pico.getRoot', |
73 | - [ 'site' => $exampleSite ] |
|
73 | + ['site' => $exampleSite] |
|
74 | 74 | ); |
75 | 75 | |
76 | 76 | $baseUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . Application::APP_NAME . '/pico/'; |
@@ -33,8 +33,7 @@ |
||
33 | 33 | use OCP\IURLGenerator; |
34 | 34 | use OCP\Settings\ISettings; |
35 | 35 | |
36 | -class Personal implements ISettings |
|
37 | -{ |
|
36 | +class Personal implements ISettings { |
|
38 | 37 | /** @var IURLGenerator */ |
39 | 38 | private $urlGenerator; |
40 | 39 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $exampleProxyUrl = $this->urlGenerator->getBaseUrl() . '/sites/' . urlencode($exampleSite) . '/'; |
62 | 62 | $exampleFullUrl = $this->urlGenerator->linkToRouteAbsolute( |
63 | 63 | Application::APP_NAME . '.Pico.getRoot', |
64 | - [ 'site' => $exampleSite ] |
|
64 | + ['site' => $exampleSite] |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | $internalBaseUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . Application::APP_NAME . '/'; |
@@ -32,8 +32,7 @@ |
||
32 | 32 | use OCP\IURLGenerator; |
33 | 33 | use OCP\Settings\ISettings; |
34 | 34 | |
35 | -class Admin implements ISettings |
|
36 | -{ |
|
35 | +class Admin implements ISettings { |
|
37 | 36 | /** @var IURLGenerator */ |
38 | 37 | private $urlGenerator; |
39 | 38 |
@@ -30,8 +30,7 @@ |
||
30 | 30 | use OCA\CMSPico\Service\PicoService; |
31 | 31 | use Pico; |
32 | 32 | |
33 | -class PicoPage |
|
34 | -{ |
|
33 | +class PicoPage { |
|
35 | 34 | /** @var Pico */ |
36 | 35 | private $pico; |
37 | 36 |
@@ -135,7 +135,7 @@ |
||
135 | 135 | { |
136 | 136 | if (!$this->getProxyRequest()) { |
137 | 137 | $route = Application::APP_NAME . '.Pico.getRoot'; |
138 | - $parameters = [ 'site' => $this->getSite() ]; |
|
138 | + $parameters = ['site' => $this->getSite()]; |
|
139 | 139 | return $this->urlGenerator->linkToRoute($route, $parameters); |
140 | 140 | } else { |
141 | 141 | return \OC::$WEBROOT . '/sites/' . urlencode($this->getSite()) . '/'; |
@@ -52,8 +52,7 @@ |
||
52 | 52 | use OCP\IL10N; |
53 | 53 | use OCP\IURLGenerator; |
54 | 54 | |
55 | -class Website extends WebsiteCore |
|
56 | -{ |
|
55 | +class Website extends WebsiteCore { |
|
57 | 56 | /** @var int */ |
58 | 57 | const SITE_LENGTH_MIN = 3; |
59 | 58 |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | */ |
189 | 189 | public function setType(int $type): self |
190 | 190 | { |
191 | - if (!in_array($type, [ self::TYPE_PUBLIC, self::TYPE_PRIVATE ], true)) { |
|
191 | + if (!in_array($type, [self::TYPE_PUBLIC, self::TYPE_PRIVATE], true)) { |
|
192 | 192 | throw new \UnexpectedValueException(); |
193 | 193 | } |
194 | 194 | |
@@ -411,15 +411,15 @@ discard block |
||
411 | 411 | |
412 | 412 | $creation = 0; |
413 | 413 | if (!empty($data['creation'])) { |
414 | - $creation = is_numeric($data['creation']) ? (int) $data['creation'] : strtotime($data['creation']); |
|
414 | + $creation = is_numeric($data['creation']) ? (int)$data['creation'] : strtotime($data['creation']); |
|
415 | 415 | } |
416 | 416 | |
417 | - $this->setId(isset($data['id']) ? (int) $data['id'] : 0) |
|
417 | + $this->setId(isset($data['id']) ? (int)$data['id'] : 0) |
|
418 | 418 | ->setUserId($data['user_id']) |
419 | 419 | ->setName($data['name']) |
420 | 420 | ->setSite($data['site']) |
421 | 421 | ->setTheme($data['theme'] ?? 'default') |
422 | - ->setType(isset($data['type']) ? (int) $data['type'] : self::TYPE_PUBLIC) |
|
422 | + ->setType(isset($data['type']) ? (int)$data['type'] : self::TYPE_PUBLIC) |
|
423 | 423 | ->setOptions($options) |
424 | 424 | ->setPath($data['path']) |
425 | 425 | ->setCreation($creation) |
@@ -25,8 +25,7 @@ |
||
25 | 25 | |
26 | 26 | namespace OCA\CMSPico\Model; |
27 | 27 | |
28 | -class WebsiteCore implements \JsonSerializable |
|
29 | -{ |
|
28 | +class WebsiteCore implements \JsonSerializable { |
|
30 | 29 | /** @var int */ |
31 | 30 | const TYPE_PUBLIC = 1; |
32 | 31 |