Passed
Pull Request — master (#77)
by Daniel
03:08
created
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 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
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/';
Please login to merge, or discard this 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
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.getRoot',
64
-			[ 'site' => $exampleSite ]
64
+			['site' => $exampleSite]
65 65
 		);
66 66
 
67 67
 		$internalBaseUrl = $this->urlGenerator->getBaseUrl() . '/index.php/apps/' . Application::APP_NAME . '/';
Please login to merge, or discard this patch.
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.
lib/Model/PicoPage.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 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
 
Please login to merge, or discard this patch.
lib/Model/Website.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
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()) . '/';
Please login to merge, or discard this patch.
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.
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.
lib/Model/TemplateFile.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\Files\MemoryFile;
29 29
 
30
-class TemplateFile extends MemoryFile
31
-{
30
+class TemplateFile extends MemoryFile {
32 31
 	/**
33 32
 	 * @param array<string,string> $data
34 33
 	 */
Please login to merge, or discard this patch.