Passed
Pull Request — master (#77)
by Daniel
02:37
created
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 OCP\Files\NotPermittedException;
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.
lib/Service/TemplatesService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
 	 */
140 140
 	public function installTemplates(Website $website)
141 141
 	{
142
-		$filesIterator = function (FolderInterface $folder, string $basePath = '') use (&$filesIterator) {
142
+		$filesIterator = function(FolderInterface $folder, string $basePath = '') use (&$filesIterator) {
143 143
 			$files = [];
144 144
 			foreach ($folder->listing() as $node) {
145 145
 				if ($node->isFolder()) {
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 OCP\Files\InvalidPathException;
35 35
 use OCP\Files\NotFoundException;
36 36
 
37
-class TemplatesService
38
-{
37
+class TemplatesService {
39 38
 	/** @var ConfigService */
40 39
 	private $configService;
41 40
 
Please login to merge, or discard this patch.
lib/Exceptions/PluginNotCompatibleException.php 2 patches
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 PluginNotCompatibleException extends \Exception
28
-{
27
+class PluginNotCompatibleException extends \Exception {
29 28
 	/** @var string */
30 29
 	private $pluginName;
31 30
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 		}
70 70
 
71 71
 		$reasonData = $this->reasonData;
72
-		$replaceCallback = function (array $matches) use ($reasonData) {
72
+		$replaceCallback = function(array $matches) use ($reasonData) {
73 73
 			return $reasonData[$matches[1]] ?? '';
74 74
 		};
75 75
 
Please login to merge, or discard this patch.
lib/Exceptions/PluginNotFoundException.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 PluginNotFoundException extends \Exception
28
-{
27
+class PluginNotFoundException extends \Exception {
29 28
 
30 29
 }
Please login to merge, or discard this patch.