Passed
Push — master ( 3770a5...ac2bc2 )
by John
13:02 queued 12s
created
apps/files/lib/Capabilities.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -43,43 +43,43 @@
 block discarded – undo
43 43
  */
44 44
 class Capabilities implements ICapability {
45 45
 
46
-	/** @var IConfig */
47
-	protected $config;
46
+    /** @var IConfig */
47
+    protected $config;
48 48
 
49
-	/** @var DirectEditingService */
50
-	protected $directEditingService;
49
+    /** @var DirectEditingService */
50
+    protected $directEditingService;
51 51
 
52
-	/** @var IURLGenerator */
53
-	private $urlGenerator;
52
+    /** @var IURLGenerator */
53
+    private $urlGenerator;
54 54
 
55
-	/**
56
-	 * Capabilities constructor.
57
-	 *
58
-	 * @param IConfig $config
59
-	 */
60
-	public function __construct(IConfig $config, DirectEditingService $directEditingService, IURLGenerator $urlGenerator) {
61
-		$this->config = $config;
62
-		$this->directEditingService = $directEditingService;
63
-		$this->urlGenerator = $urlGenerator;
64
-	}
55
+    /**
56
+     * Capabilities constructor.
57
+     *
58
+     * @param IConfig $config
59
+     */
60
+    public function __construct(IConfig $config, DirectEditingService $directEditingService, IURLGenerator $urlGenerator) {
61
+        $this->config = $config;
62
+        $this->directEditingService = $directEditingService;
63
+        $this->urlGenerator = $urlGenerator;
64
+    }
65 65
 
66
-	/**
67
-	 * Return this classes capabilities
68
-	 *
69
-	 * @return array
70
-	 */
71
-	public function getCapabilities() {
72
-		return [
73
-			'files' => [
74
-				'bigfilechunking' => true,
75
-				'blacklisted_files' => $this->config->getSystemValue('blacklisted_files', ['.htaccess']),
76
-				'directEditing' => [
77
-					'url' => $this->urlGenerator->linkToOCSRouteAbsolute('files.DirectEditing.info'),
78
-					'etag' => $this->directEditingService->getDirectEditingETag()
79
-				]
80
-			],
81
-		];
82
-	}
66
+    /**
67
+     * Return this classes capabilities
68
+     *
69
+     * @return array
70
+     */
71
+    public function getCapabilities() {
72
+        return [
73
+            'files' => [
74
+                'bigfilechunking' => true,
75
+                'blacklisted_files' => $this->config->getSystemValue('blacklisted_files', ['.htaccess']),
76
+                'directEditing' => [
77
+                    'url' => $this->urlGenerator->linkToOCSRouteAbsolute('files.DirectEditing.info'),
78
+                    'etag' => $this->directEditingService->getDirectEditingETag()
79
+                ]
80
+            ],
81
+        ];
82
+    }
83 83
 
84 84
 
85 85
 }
Please login to merge, or discard this patch.
apps/files/lib/Controller/DirectEditingViewController.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -36,37 +36,37 @@
 block discarded – undo
36 36
 
37 37
 class DirectEditingViewController extends Controller {
38 38
 
39
-	/** @var IEventDispatcher */
40
-	private $eventDispatcher;
39
+    /** @var IEventDispatcher */
40
+    private $eventDispatcher;
41 41
 
42
-	/** @var IManager */
43
-	private $directEditingManager;
42
+    /** @var IManager */
43
+    private $directEditingManager;
44 44
 
45
-	/** @var ILogger */
46
-	private $logger;
45
+    /** @var ILogger */
46
+    private $logger;
47 47
 
48
-	public function __construct($appName, IRequest $request, IEventDispatcher $eventDispatcher, IManager $manager, ILogger $logger) {
49
-		parent::__construct($appName, $request);
48
+    public function __construct($appName, IRequest $request, IEventDispatcher $eventDispatcher, IManager $manager, ILogger $logger) {
49
+        parent::__construct($appName, $request);
50 50
 
51
-		$this->eventDispatcher = $eventDispatcher;
52
-		$this->directEditingManager = $manager;
53
-		$this->logger = $logger;
54
-	}
51
+        $this->eventDispatcher = $eventDispatcher;
52
+        $this->directEditingManager = $manager;
53
+        $this->logger = $logger;
54
+    }
55 55
 
56
-	/**
57
-	 * @PublicPage
58
-	 * @NoCSRFRequired
59
-	 *
60
-	 * @param string $token
61
-	 * @return Response
62
-	 */
63
-	public function edit(string $token): Response {
64
-		$this->eventDispatcher->dispatchTyped(new RegisterDirectEditorEvent($this->directEditingManager));
65
-		try {
66
-			return $this->directEditingManager->edit($token);
67
-		} catch (Exception $e) {
68
-			$this->logger->logException($e);
69
-			return new NotFoundResponse();
70
-		}
71
-	}
56
+    /**
57
+     * @PublicPage
58
+     * @NoCSRFRequired
59
+     *
60
+     * @param string $token
61
+     * @return Response
62
+     */
63
+    public function edit(string $token): Response {
64
+        $this->eventDispatcher->dispatchTyped(new RegisterDirectEditorEvent($this->directEditingManager));
65
+        try {
66
+            return $this->directEditingManager->edit($token);
67
+        } catch (Exception $e) {
68
+            $this->logger->logException($e);
69
+            return new NotFoundResponse();
70
+        }
71
+    }
72 72
 }
Please login to merge, or discard this patch.
lib/public/Files/File.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -42,72 +42,72 @@
 block discarded – undo
42 42
  * @since 6.0.0
43 43
  */
44 44
 interface File extends Node {
45
-	/**
46
-	 * Get the content of the file as string
47
-	 *
48
-	 * @return string
49
-	 * @throws NotPermittedException
50
-	 * @throws LockedException
51
-	 * @since 6.0.0
52
-	 */
53
-	public function getContent();
45
+    /**
46
+     * Get the content of the file as string
47
+     *
48
+     * @return string
49
+     * @throws NotPermittedException
50
+     * @throws LockedException
51
+     * @since 6.0.0
52
+     */
53
+    public function getContent();
54 54
 
55
-	/**
56
-	 * Write to the file from string data
57
-	 *
58
-	 * @param string|resource $data
59
-	 * @throws NotPermittedException
60
-	 * @throws GenericFileException
61
-	 * @throws LockedException
62
-	 * @since 6.0.0
63
-	 */
64
-	public function putContent($data);
55
+    /**
56
+     * Write to the file from string data
57
+     *
58
+     * @param string|resource $data
59
+     * @throws NotPermittedException
60
+     * @throws GenericFileException
61
+     * @throws LockedException
62
+     * @since 6.0.0
63
+     */
64
+    public function putContent($data);
65 65
 
66
-	/**
67
-	 * Get the mimetype of the file
68
-	 *
69
-	 * @return string
70
-	 * @since 6.0.0
71
-	 */
72
-	public function getMimeType();
66
+    /**
67
+     * Get the mimetype of the file
68
+     *
69
+     * @return string
70
+     * @since 6.0.0
71
+     */
72
+    public function getMimeType();
73 73
 
74
-	/**
75
-	 * Open the file as stream, resulting resource can be operated as stream like the result from php's own fopen
76
-	 *
77
-	 * @param string $mode
78
-	 * @return resource
79
-	 * @throws NotPermittedException
80
-	 * @throws LockedException
81
-	 * @since 6.0.0
82
-	 */
83
-	public function fopen($mode);
74
+    /**
75
+     * Open the file as stream, resulting resource can be operated as stream like the result from php's own fopen
76
+     *
77
+     * @param string $mode
78
+     * @return resource
79
+     * @throws NotPermittedException
80
+     * @throws LockedException
81
+     * @since 6.0.0
82
+     */
83
+    public function fopen($mode);
84 84
 
85
-	/**
86
-	 * Compute the hash of the file
87
-	 * Type of hash is set with $type and can be anything supported by php's hash_file
88
-	 *
89
-	 * @param string $type
90
-	 * @param bool $raw
91
-	 * @return string
92
-	 * @since 6.0.0
93
-	 */
94
-	public function hash($type, $raw = false);
85
+    /**
86
+     * Compute the hash of the file
87
+     * Type of hash is set with $type and can be anything supported by php's hash_file
88
+     *
89
+     * @param string $type
90
+     * @param bool $raw
91
+     * @return string
92
+     * @since 6.0.0
93
+     */
94
+    public function hash($type, $raw = false);
95 95
 
96
-	/**
97
-	 * Get the stored checksum for this file
98
-	 *
99
-	 * @return string
100
-	 * @since 9.0.0
101
-	 * @throws InvalidPathException
102
-	 * @throws NotFoundException
103
-	 */
104
-	public function getChecksum();
96
+    /**
97
+     * Get the stored checksum for this file
98
+     *
99
+     * @return string
100
+     * @since 9.0.0
101
+     * @throws InvalidPathException
102
+     * @throws NotFoundException
103
+     */
104
+    public function getChecksum();
105 105
 
106
-	/**
107
-	 * Get the extension of this file
108
-	 *
109
-	 * @return string
110
-	 * @since 15.0.0
111
-	 */
112
-	public function getExtension(): string;
106
+    /**
107
+     * Get the extension of this file
108
+     *
109
+     * @return string
110
+     * @since 15.0.0
111
+     */
112
+    public function getExtension(): string;
113 113
 }
Please login to merge, or discard this patch.
lib/public/WorkflowEngine/IEntity.php 1 patch
Indentation   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -40,46 +40,46 @@
 block discarded – undo
40 40
  */
41 41
 interface IEntity {
42 42
 
43
-	/**
44
-	 * returns a translated name to be presented in the web interface.
45
-	 *
46
-	 * Example: "File" (en), "Dosiero" (eo)
47
-	 *
48
-	 * @since 18.0.0
49
-	 */
50
-	public function getName(): string;
43
+    /**
44
+     * returns a translated name to be presented in the web interface.
45
+     *
46
+     * Example: "File" (en), "Dosiero" (eo)
47
+     *
48
+     * @since 18.0.0
49
+     */
50
+    public function getName(): string;
51 51
 
52
-	/**
53
-	 * returns the URL to the icon of the entity for display in the web interface.
54
-	 *
55
-	 * Usually, the implementation would utilize the `imagePath()` method of the
56
-	 * `\OCP\IURLGenerator` instance and simply return its result.
57
-	 *
58
-	 * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg');
59
-	 *
60
-	 * @since 18.0.0
61
-	 */
62
-	public function getIcon(): string;
52
+    /**
53
+     * returns the URL to the icon of the entity for display in the web interface.
54
+     *
55
+     * Usually, the implementation would utilize the `imagePath()` method of the
56
+     * `\OCP\IURLGenerator` instance and simply return its result.
57
+     *
58
+     * Example implementation: return $this->urlGenerator->imagePath('myApp', 'cat.svg');
59
+     *
60
+     * @since 18.0.0
61
+     */
62
+    public function getIcon(): string;
63 63
 
64
-	/**
65
-	 * returns a list of supported events
66
-	 *
67
-	 * @return IEntityEvent[]
68
-	 * @since 18.0.0
69
-	 */
70
-	public function getEvents(): array;
64
+    /**
65
+     * returns a list of supported events
66
+     *
67
+     * @return IEntityEvent[]
68
+     * @since 18.0.0
69
+     */
70
+    public function getEvents(): array;
71 71
 
72
-	/**
73
-	 * @since 18.0.0
74
-	 */
75
-	public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void;
72
+    /**
73
+     * @since 18.0.0
74
+     */
75
+    public function prepareRuleMatcher(IRuleMatcher $ruleMatcher, string $eventName, Event $event): void;
76 76
 
77
-	/**
78
-	 * returns whether the provided user id is allowed to run a flow against
79
-	 * the known context
80
-	 *
81
-	 * @since 18.0.0
82
-	 */
83
-	public function isLegitimatedForUserId(string $userId): bool;
77
+    /**
78
+     * returns whether the provided user id is allowed to run a flow against
79
+     * the known context
80
+     *
81
+     * @since 18.0.0
82
+     */
83
+    public function isLegitimatedForUserId(string $userId): bool;
84 84
 
85 85
 }
Please login to merge, or discard this patch.
lib/public/WorkflowEngine/EntityContext/IUrl.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
  * @since 18.0.0
33 33
  */
34 34
 interface IUrl {
35
-	/**
36
-	 * returns a URL that is related to the entity, e.g. the link to a share
37
-	 *
38
-	 * @since 18.0.0
39
-	 */
40
-	public function getUrl(): string;
35
+    /**
36
+     * returns a URL that is related to the entity, e.g. the link to a share
37
+     *
38
+     * @since 18.0.0
39
+     */
40
+    public function getUrl(): string;
41 41
 }
Please login to merge, or discard this patch.
lib/public/WorkflowEngine/EntityContext/IDisplayName.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@
 block discarded – undo
32 32
  * @since 18.0.0
33 33
  */
34 34
 interface IDisplayName {
35
-	/**
36
-	 * returns the end user facing name of the object related to the entity
37
-	 *
38
-	 * @since 18.0.0
39
-	 */
40
-	public function getDisplayName(): string;
35
+    /**
36
+     * returns the end user facing name of the object related to the entity
37
+     *
38
+     * @since 18.0.0
39
+     */
40
+    public function getDisplayName(): string;
41 41
 }
Please login to merge, or discard this patch.
lib/public/WorkflowEngine/EntityContext/IIcon.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
  * @since 18.0.0
33 33
  */
34 34
 interface IIcon {
35
-	/**
36
-	 * returns a URL to an icon that is related to the entity, for instance
37
-	 * a group icon for groups.
38
-	 *
39
-	 * @since 18.0.0
40
-	 */
41
-	public function getIconUrl(): string;
35
+    /**
36
+     * returns a URL to an icon that is related to the entity, for instance
37
+     * a group icon for groups.
38
+     *
39
+     * @since 18.0.0
40
+     */
41
+    public function getIconUrl(): string;
42 42
 }
Please login to merge, or discard this patch.
lib/public/WorkflowEngine/EntityContext/IDisplayText.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 block discarded – undo
33 33
  */
34 34
 interface IDisplayText {
35 35
 
36
-	/**
37
-	 * returns translated text used for display to the end user. For instance,
38
-	 * it can describe the event in a human readable way.
39
-	 *
40
-	 * The entity may react to a verbosity level that is provided. With the
41
-	 * basic level, 0, it would return brief information, and more with higher
42
-	 * numbers. All information shall be shown at a level of 3.
43
-	 *
44
-	 * @since 18.0.0
45
-	 */
46
-	public function getDisplayText(int $verbosity = 0): string;
36
+    /**
37
+     * returns translated text used for display to the end user. For instance,
38
+     * it can describe the event in a human readable way.
39
+     *
40
+     * The entity may react to a verbosity level that is provided. With the
41
+     * basic level, 0, it would return brief information, and more with higher
42
+     * numbers. All information shall be shown at a level of 3.
43
+     *
44
+     * @since 18.0.0
45
+     */
46
+    public function getDisplayText(int $verbosity = 0): string;
47 47
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/ICSExportPlugin/ICSExportPlugin.php 1 patch
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -36,62 +36,62 @@
 block discarded – undo
36 36
  */
37 37
 class ICSExportPlugin extends \Sabre\CalDAV\ICSExportPlugin {
38 38
 
39
-	/** @var IConfig */
40
-	private $config;
39
+    /** @var IConfig */
40
+    private $config;
41 41
 
42
-	/** @var ILogger */
43
-	private $logger;
42
+    /** @var ILogger */
43
+    private $logger;
44 44
 
45
-	/** @var string */
46
-	private const DEFAULT_REFRESH_INTERVAL = 'PT4H';
45
+    /** @var string */
46
+    private const DEFAULT_REFRESH_INTERVAL = 'PT4H';
47 47
 
48
-	/**
49
-	 * ICSExportPlugin constructor.
50
-	 *
51
-	 * @param IConfig $config
52
-	 */
53
-	public function __construct(IConfig $config, ILogger $logger) {
54
-		$this->config = $config;
55
-		$this->logger = $logger;
56
-	}
48
+    /**
49
+     * ICSExportPlugin constructor.
50
+     *
51
+     * @param IConfig $config
52
+     */
53
+    public function __construct(IConfig $config, ILogger $logger) {
54
+        $this->config = $config;
55
+        $this->logger = $logger;
56
+    }
57 57
 
58
-	/**
59
-	 * @inheritDoc
60
-	 */
61
-	protected function generateResponse($path, $start, $end, $expand, $componentType, $format, $properties, ResponseInterface $response) {
62
-		if (!isset($properties['{http://nextcloud.com/ns}refresh-interval'])) {
63
-			$value = $this->config->getAppValue('dav', 'defaultRefreshIntervalExportedCalendars', self::DEFAULT_REFRESH_INTERVAL);
64
-			$properties['{http://nextcloud.com/ns}refresh-interval'] = $value;
65
-		}
58
+    /**
59
+     * @inheritDoc
60
+     */
61
+    protected function generateResponse($path, $start, $end, $expand, $componentType, $format, $properties, ResponseInterface $response) {
62
+        if (!isset($properties['{http://nextcloud.com/ns}refresh-interval'])) {
63
+            $value = $this->config->getAppValue('dav', 'defaultRefreshIntervalExportedCalendars', self::DEFAULT_REFRESH_INTERVAL);
64
+            $properties['{http://nextcloud.com/ns}refresh-interval'] = $value;
65
+        }
66 66
 
67
-		return parent::generateResponse($path, $start, $end, $expand, $componentType, $format, $properties, $response);
68
-	}
67
+        return parent::generateResponse($path, $start, $end, $expand, $componentType, $format, $properties, $response);
68
+    }
69 69
 
70
-	/**
71
-	 * @inheritDoc
72
-	 */
73
-	public function mergeObjects(array $properties, array $inputObjects) {
74
-		$vcalendar = parent::mergeObjects($properties, $inputObjects);
70
+    /**
71
+     * @inheritDoc
72
+     */
73
+    public function mergeObjects(array $properties, array $inputObjects) {
74
+        $vcalendar = parent::mergeObjects($properties, $inputObjects);
75 75
 
76
-		if (isset($properties['{http://nextcloud.com/ns}refresh-interval'])) {
77
-			$refreshIntervalValue = $properties['{http://nextcloud.com/ns}refresh-interval'];
78
-			try {
79
-				DateTimeParser::parseDuration($refreshIntervalValue);
80
-			} catch (InvalidDataException $ex) {
81
-				$this->logger->debug('Invalid refresh interval for exported calendar, falling back to default value ...');
82
-				$refreshIntervalValue = self::DEFAULT_REFRESH_INTERVAL;
83
-			}
76
+        if (isset($properties['{http://nextcloud.com/ns}refresh-interval'])) {
77
+            $refreshIntervalValue = $properties['{http://nextcloud.com/ns}refresh-interval'];
78
+            try {
79
+                DateTimeParser::parseDuration($refreshIntervalValue);
80
+            } catch (InvalidDataException $ex) {
81
+                $this->logger->debug('Invalid refresh interval for exported calendar, falling back to default value ...');
82
+                $refreshIntervalValue = self::DEFAULT_REFRESH_INTERVAL;
83
+            }
84 84
 
85
-			// https://tools.ietf.org/html/rfc7986#section-5.7
86
-			$refreshInterval = new Duration($vcalendar, 'REFRESH-INTERVAL', $refreshIntervalValue);
87
-			$refreshInterval->add('VALUE', 'DURATION');
88
-			$vcalendar->add($refreshInterval);
85
+            // https://tools.ietf.org/html/rfc7986#section-5.7
86
+            $refreshInterval = new Duration($vcalendar, 'REFRESH-INTERVAL', $refreshIntervalValue);
87
+            $refreshInterval->add('VALUE', 'DURATION');
88
+            $vcalendar->add($refreshInterval);
89 89
 
90
-			// Legacy property for compatibility
91
-			$vcalendar->{'X-PUBLISHED-TTL'} = $refreshIntervalValue;
92
-		}
90
+            // Legacy property for compatibility
91
+            $vcalendar->{'X-PUBLISHED-TTL'} = $refreshIntervalValue;
92
+        }
93 93
 
94
-		return $vcalendar;
95
-	}
94
+        return $vcalendar;
95
+    }
96 96
 
97 97
 }
Please login to merge, or discard this patch.