Passed
Pull Request — master (#77)
by Daniel
03:05
created
lib/Http/PicoFileResponse.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			$lastModified = $file->getMTime();
77 77
 			$mimeType = $file->getMimeType();
78 78
 
79
-			if (($file->getPermissions() & Constants::PERMISSION_READ) !== Constants::PERMISSION_READ) {
79
+			if (($file->getPermissions()&Constants::PERMISSION_READ) !== Constants::PERMISSION_READ) {
80 80
 				throw new NotPermittedException();
81 81
 			}
82 82
 		} catch (InvalidPathException $e) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 */
123 123
 	public function cacheFor(int $cacheSeconds): self
124 124
 	{
125
-		if($cacheSeconds > 0) {
125
+		if ($cacheSeconds > 0) {
126 126
 			$this->addHeader('Cache-Control', 'max-age=' . $cacheSeconds . ', public');
127 127
 			$this->addHeader('Pragma', 'public');
128 128
 
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\Files\NotFoundException;
33 33
 use OCP\Files\NotPermittedException;
34 34
 
35
-class PicoFileResponse extends DownloadResponse
36
-{
35
+class PicoFileResponse extends DownloadResponse {
37 36
 	/** @var File */
38 37
 	private $file;
39 38
 
Please login to merge, or discard this patch.
lib/Http/PicoPageResponse.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\Http\EmptyContentSecurityPolicy;
29 29
 use OCP\AppFramework\Http\Response;
30 30
 
31
-class PicoPageResponse extends Response
32
-{
31
+class PicoPageResponse extends Response {
33 32
 	/** @var PicoPage */
34 33
 	private $page;
35 34
 
Please login to merge, or discard this patch.
lib/Http/NotFoundResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	 */
38 38
 	public function __construct(string $message = null)
39 39
 	{
40
-		parent::__construct(Application::APP_NAME, '404', [ 'message' => $message ], 'guest');
40
+		parent::__construct(Application::APP_NAME, '404', ['message' => $message], 'guest');
41 41
 		$this->setStatus(Http::STATUS_NOT_FOUND);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\Http;
29 29
 use OCP\AppFramework\Http\TemplateResponse;
30 30
 
31
-class NotFoundResponse extends TemplateResponse
32
-{
31
+class NotFoundResponse extends TemplateResponse {
33 32
 	/**
34 33
 	 * NotFoundResponse constructor.
35 34
 	 *
Please login to merge, or discard this patch.
lib/Http/PicoErrorResponse.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\Http;
29 29
 use OCP\AppFramework\Http\TemplateResponse;
30 30
 
31
-class PicoErrorResponse extends TemplateResponse
32
-{
31
+class PicoErrorResponse extends TemplateResponse {
33 32
 	/** @var \Exception|null */
34 33
 	private $exception;
35 34
 
Please login to merge, or discard this patch.
lib/Http/NotPermittedResponse.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	 */
38 38
 	public function __construct(string $message = null)
39 39
 	{
40
-		parent::__construct(Application::APP_NAME, '403', [ 'message' => $message ], 'guest');
40
+		parent::__construct(Application::APP_NAME, '403', ['message' => $message], 'guest');
41 41
 		$this->setStatus(Http::STATUS_FORBIDDEN);
42 42
 	}
43 43
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\Http;
29 29
 use OCP\AppFramework\Http\TemplateResponse;
30 30
 
31
-class NotPermittedResponse extends TemplateResponse
32
-{
31
+class NotPermittedResponse extends TemplateResponse {
33 32
 	/**
34 33
 	 * NotPermittedResponse constructor.
35 34
 	 *
Please login to merge, or discard this patch.
lib/Pico.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@
 block discarded – undo
178 178
 		if ($this->htmlPurifier === null) {
179 179
 			$this->htmlPurifier = new HTMLPurifier(HTMLPurifier_Config::createDefault());
180 180
 
181
-			$this->triggerEvent('onHtmlPurifier', [ &$this->htmlPurifier ]);
181
+			$this->triggerEvent('onHtmlPurifier', [&$this->htmlPurifier]);
182 182
 		}
183 183
 
184 184
 		return $this->htmlPurifier;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@
 block discarded – undo
34 34
 use OCA\CMSPico\Model\Website;
35 35
 use Symfony\Component\Yaml\Exception\ParseException;
36 36
 
37
-class Pico extends \Pico
38
-{
37
+class Pico extends \Pico {
39 38
 	/** @var HTMLPurifier */
40 39
 	protected $htmlPurifier;
41 40
 
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCP\AppFramework\App;
29 29
 use OCP\Util;
30 30
 
31
-class Application extends App
32
-{
31
+class Application extends App {
33 32
 	/** @var string */
34 33
 	const APP_NAME = 'cms_pico';
35 34
 
Please login to merge, or discard this patch.
lib/Service/PicoService.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,8 +41,7 @@
 block discarded – undo
41 41
 use OCP\Files\NotPermittedException;
42 42
 use OCP\ILogger;
43 43
 
44
-class PicoService
45
-{
44
+class PicoService {
46 45
 	/** @var string */
47 46
 	const DIR_TEMPLATES = 'templates';
48 47
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 				throw $e;
143 143
 			} catch (\Exception $e) {
144 144
 				$exception = new PicoRuntimeException($e);
145
-				$this->logger->logException($exception, [ 'app' => Application::APP_NAME ]);
145
+				$this->logger->logException($exception, ['app' => Application::APP_NAME]);
146 146
 				throw $exception;
147 147
 			}
148 148
 
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 	 */
194 194
 	private function loadPicoPlugins(Pico $pico)
195 195
 	{
196
-		$includeClosure = static function (string $pluginFile) {
196
+		$includeClosure = static function(string $pluginFile) {
197 197
 			require($pluginFile);
198 198
 		};
199 199
 
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
 use OCA\CMSPico\AppInfo\Application;
29 29
 use OCP\IConfig;
30 30
 
31
-class ConfigService
32
-{
31
+class ConfigService {
33 32
 	/** @var string */
34 33
 	const CUSTOM_TEMPLATES = 'custom_templates';
35 34
 
Please login to merge, or discard this patch.