Passed
Pull Request — master (#77)
by Daniel
02:12
created
lib/Exceptions/TemplateNotFoundException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
 
25 25
 namespace OCA\CMSPico\Exceptions;
26 26
 
27
-class TemplateNotFoundException extends \Exception
28
-{
27
+class TemplateNotFoundException extends \Exception {
29 28
 
30 29
 }
Please login to merge, or discard this patch.
lib/Exceptions/AssetNotPermittedException.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
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
 	 *
Please login to merge, or discard this patch.
lib/Events/UserEvents.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Settings/PersonalSection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Settings/AdminSection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Settings/Personal.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,8 +33,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Settings/Admin.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 		$exampleProxyUrl = $this->urlGenerator->getBaseUrl() . '/sites/' . urlencode($exampleSite);
62 62
 		$exampleFullUrl = $this->urlGenerator->linkToRouteAbsolute(
63 63
 			Application::APP_NAME . '.Pico.getPage',
64
-			[ 'site' => $exampleSite, 'page' => '' ]
64
+			['site' => $exampleSite, 'page' => '']
65 65
 		);
66 66
 
67 67
 		$internalBaseUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . Application::APP_NAME;
Please login to merge, or discard this patch.
lib/Model/Website.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 			/** @var OCFolder $viewerOCFolder */
162 162
 			$viewerOCFolder = \OC::$server->getUserFolder($this->getViewer());
163
-			$viewerAccessClosure = function (OCNode $node) use ($viewerOCFolder) {
163
+			$viewerAccessClosure = function(OCNode $node) use ($viewerOCFolder) {
164 164
 				$nodeId = $node->getId();
165 165
 
166 166
 				$viewerNodes = $viewerOCFolder->getById($nodeId);
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
 	{
358 358
 		if (!$this->getProxyRequest()) {
359 359
 			$route = Application::APP_NAME . '.Pico.getPage';
360
-			$parameters = [ 'site' => $this->getSite(), 'page' => '' ];
360
+			$parameters = ['site' => $this->getSite(), 'page' => ''];
361 361
 			return $this->urlGenerator->linkToRoute($route, $parameters) . '/';
362 362
 		} else {
363 363
 			return \OC::$WEBROOT . '/sites/' . urlencode($this->getSite()) . '/';
Please login to merge, or discard this patch.
lib/Model/WebsiteCore.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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)
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.