Passed
Push — master ( 858428...c235a4 )
by Christoph
19:03 queued 12s
created
lib/public/AppFramework/OCS/OCSBadRequestException.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@
 block discarded – undo
32 32
  * @since 9.1.0
33 33
  */
34 34
 class OCSBadRequestException extends OCSException {
35
-	/**
36
-	 * OCSBadRequestException constructor.
37
-	 *
38
-	 * @param string $message
39
-	 * @param Exception|null $previous
40
-	 * @since 9.1.0
41
-	 */
42
-	public function __construct($message = '', Exception $previous = null) {
43
-		parent::__construct($message, Http::STATUS_BAD_REQUEST, $previous);
44
-	}
35
+    /**
36
+     * OCSBadRequestException constructor.
37
+     *
38
+     * @param string $message
39
+     * @param Exception|null $previous
40
+     * @since 9.1.0
41
+     */
42
+    public function __construct($message = '', Exception $previous = null) {
43
+        parent::__construct($message, Http::STATUS_BAD_REQUEST, $previous);
44
+    }
45 45
 }
Please login to merge, or discard this patch.
lib/private/Files/Storage/Home.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function __construct($arguments) {
51 51
 		$this->user = $arguments['user'];
52 52
 		$datadir = $this->user->getHome();
53
-		$this->id = 'home::' . $this->user->getUID();
53
+		$this->id = 'home::'.$this->user->getUID();
54 54
 
55 55
 		parent::__construct(['datadir' => $datadir]);
56 56
 	}
Please login to merge, or discard this patch.
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -33,80 +33,80 @@
 block discarded – undo
33 33
  * Specialized version of Local storage for home directory usage
34 34
  */
35 35
 class Home extends Local implements \OCP\Files\IHomeStorage {
36
-	/**
37
-	 * @var string
38
-	 */
39
-	protected $id;
36
+    /**
37
+     * @var string
38
+     */
39
+    protected $id;
40 40
 
41
-	/**
42
-	 * @var \OC\User\User $user
43
-	 */
44
-	protected $user;
41
+    /**
42
+     * @var \OC\User\User $user
43
+     */
44
+    protected $user;
45 45
 
46
-	/**
47
-	 * Construct a Home storage instance
48
-	 *
49
-	 * @param array $arguments array with "user" containing the
50
-	 * storage owner
51
-	 */
52
-	public function __construct($arguments) {
53
-		$this->user = $arguments['user'];
54
-		$datadir = $this->user->getHome();
55
-		$this->id = 'home::' . $this->user->getUID();
46
+    /**
47
+     * Construct a Home storage instance
48
+     *
49
+     * @param array $arguments array with "user" containing the
50
+     * storage owner
51
+     */
52
+    public function __construct($arguments) {
53
+        $this->user = $arguments['user'];
54
+        $datadir = $this->user->getHome();
55
+        $this->id = 'home::' . $this->user->getUID();
56 56
 
57
-		parent::__construct(['datadir' => $datadir]);
58
-	}
57
+        parent::__construct(['datadir' => $datadir]);
58
+    }
59 59
 
60
-	public function getId() {
61
-		return $this->id;
62
-	}
60
+    public function getId() {
61
+        return $this->id;
62
+    }
63 63
 
64
-	/**
65
-	 * @return \OC\Files\Cache\HomeCache
66
-	 */
67
-	public function getCache($path = '', $storage = null) {
68
-		if (!$storage) {
69
-			$storage = $this;
70
-		}
71
-		if (!isset($this->cache)) {
72
-			$this->cache = new \OC\Files\Cache\HomeCache($storage);
73
-		}
74
-		return $this->cache;
75
-	}
64
+    /**
65
+     * @return \OC\Files\Cache\HomeCache
66
+     */
67
+    public function getCache($path = '', $storage = null) {
68
+        if (!$storage) {
69
+            $storage = $this;
70
+        }
71
+        if (!isset($this->cache)) {
72
+            $this->cache = new \OC\Files\Cache\HomeCache($storage);
73
+        }
74
+        return $this->cache;
75
+    }
76 76
 
77
-	/**
78
-	 * get a propagator instance for the cache
79
-	 *
80
-	 * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
81
-	 * @return \OC\Files\Cache\Propagator
82
-	 */
83
-	public function getPropagator($storage = null) {
84
-		if (!$storage) {
85
-			$storage = $this;
86
-		}
87
-		if (!isset($this->propagator)) {
88
-			$this->propagator = new HomePropagator($storage, \OC::$server->getDatabaseConnection());
89
-		}
90
-		return $this->propagator;
91
-	}
77
+    /**
78
+     * get a propagator instance for the cache
79
+     *
80
+     * @param \OC\Files\Storage\Storage (optional) the storage to pass to the watcher
81
+     * @return \OC\Files\Cache\Propagator
82
+     */
83
+    public function getPropagator($storage = null) {
84
+        if (!$storage) {
85
+            $storage = $this;
86
+        }
87
+        if (!isset($this->propagator)) {
88
+            $this->propagator = new HomePropagator($storage, \OC::$server->getDatabaseConnection());
89
+        }
90
+        return $this->propagator;
91
+    }
92 92
 
93 93
 
94
-	/**
95
-	 * Returns the owner of this home storage
96
-	 *
97
-	 * @return \OC\User\User owner of this home storage
98
-	 */
99
-	public function getUser() {
100
-		return $this->user;
101
-	}
94
+    /**
95
+     * Returns the owner of this home storage
96
+     *
97
+     * @return \OC\User\User owner of this home storage
98
+     */
99
+    public function getUser() {
100
+        return $this->user;
101
+    }
102 102
 
103
-	/**
104
-	 * get the owner of a path
105
-	 *
106
-	 * @param string $path The path to get the owner
107
-	 * @return string uid or false
108
-	 */
109
-	public function getOwner($path) {
110
-		return $this->user->getUID();
111
-	}
103
+    /**
104
+     * get the owner of a path
105
+     *
106
+     * @param string $path The path to get the owner
107
+     * @return string uid or false
108
+     */
109
+    public function getOwner($path) {
110
+        return $this->user->getUID();
111
+    }
112 112
 }
Please login to merge, or discard this patch.
lib/private/Contacts/ContactsMenu/Providers/EMailProvider.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -31,33 +31,33 @@
 block discarded – undo
31 31
 
32 32
 class EMailProvider implements IProvider {
33 33
 
34
-	/** @var IActionFactory */
35
-	private $actionFactory;
36
-
37
-	/** @var IURLGenerator */
38
-	private $urlGenerator;
39
-
40
-	/**
41
-	 * @param IActionFactory $actionFactory
42
-	 * @param IURLGenerator $urlGenerator
43
-	 */
44
-	public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) {
45
-		$this->actionFactory = $actionFactory;
46
-		$this->urlGenerator = $urlGenerator;
47
-	}
48
-
49
-	/**
50
-	 * @param IEntry $entry
51
-	 */
52
-	public function process(IEntry $entry) {
53
-		$iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg'));
54
-		foreach ($entry->getEMailAddresses() as $address) {
55
-			if (empty($address)) {
56
-				// Skip
57
-				continue;
58
-			}
59
-			$action = $this->actionFactory->newEMailAction($iconUrl, $address, $address);
60
-			$entry->addAction($action);
61
-		}
62
-	}
34
+    /** @var IActionFactory */
35
+    private $actionFactory;
36
+
37
+    /** @var IURLGenerator */
38
+    private $urlGenerator;
39
+
40
+    /**
41
+     * @param IActionFactory $actionFactory
42
+     * @param IURLGenerator $urlGenerator
43
+     */
44
+    public function __construct(IActionFactory $actionFactory, IURLGenerator $urlGenerator) {
45
+        $this->actionFactory = $actionFactory;
46
+        $this->urlGenerator = $urlGenerator;
47
+    }
48
+
49
+    /**
50
+     * @param IEntry $entry
51
+     */
52
+    public function process(IEntry $entry) {
53
+        $iconUrl = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->imagePath('core', 'actions/mail.svg'));
54
+        foreach ($entry->getEMailAddresses() as $address) {
55
+            if (empty($address)) {
56
+                // Skip
57
+                continue;
58
+            }
59
+            $action = $this->actionFactory->newEMailAction($iconUrl, $address, $address);
60
+            $entry->addAction($action);
61
+        }
62
+    }
63 63
 }
Please login to merge, or discard this patch.
Middleware/Security/Exceptions/StrictCookieMissingException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
  * @package OC\AppFramework\Middleware\Security\Exceptions
33 33
  */
34 34
 class StrictCookieMissingException extends SecurityException {
35
-	public function __construct() {
36
-		parent::__construct('Strict Cookie has not been found in request.', Http::STATUS_PRECONDITION_FAILED);
37
-	}
35
+    public function __construct() {
36
+        parent::__construct('Strict Cookie has not been found in request.', Http::STATUS_PRECONDITION_FAILED);
37
+    }
38 38
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/PublicCalendarObject.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@
 block discarded – undo
23 23
 
24 24
 class PublicCalendarObject extends CalendarObject {
25 25
 
26
-	/**
27
-	 * public calendars are always shared
28
-	 * @return bool
29
-	 */
30
-	protected function isShared() {
31
-		return true;
32
-	}
26
+    /**
27
+     * public calendars are always shared
28
+     * @return bool
29
+     */
30
+    protected function isShared() {
31
+        return true;
32
+    }
33 33
 }
Please login to merge, or discard this patch.
apps/dav/lib/CalDAV/PublicCalendar.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -25,63 +25,63 @@
 block discarded – undo
25 25
 
26 26
 class PublicCalendar extends Calendar {
27 27
 
28
-	/**
29
-	 * @param string $name
30
-	 * @throws NotFound
31
-	 * @return PublicCalendarObject
32
-	 */
33
-	public function getChild($name) {
34
-		$obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
28
+    /**
29
+     * @param string $name
30
+     * @throws NotFound
31
+     * @return PublicCalendarObject
32
+     */
33
+    public function getChild($name) {
34
+        $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name);
35 35
 
36
-		if (!$obj) {
37
-			throw new NotFound('Calendar object not found');
38
-		}
39
-		if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
40
-			throw new NotFound('Calendar object not found');
41
-		}
42
-		$obj['acl'] = $this->getChildACL();
36
+        if (!$obj) {
37
+            throw new NotFound('Calendar object not found');
38
+        }
39
+        if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
40
+            throw new NotFound('Calendar object not found');
41
+        }
42
+        $obj['acl'] = $this->getChildACL();
43 43
 
44
-		return new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
45
-	}
44
+        return new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
45
+    }
46 46
 
47
-	/**
48
-	 * @return PublicCalendarObject[]
49
-	 */
50
-	public function getChildren() {
51
-		$objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
52
-		$children = [];
53
-		foreach ($objs as $obj) {
54
-			if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
55
-				continue;
56
-			}
57
-			$obj['acl'] = $this->getChildACL();
58
-			$children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
59
-		}
60
-		return $children;
61
-	}
47
+    /**
48
+     * @return PublicCalendarObject[]
49
+     */
50
+    public function getChildren() {
51
+        $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']);
52
+        $children = [];
53
+        foreach ($objs as $obj) {
54
+            if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
55
+                continue;
56
+            }
57
+            $obj['acl'] = $this->getChildACL();
58
+            $children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
59
+        }
60
+        return $children;
61
+    }
62 62
 
63
-	/**
64
-	 * @param string[] $paths
65
-	 * @return PublicCalendarObject[]
66
-	 */
67
-	public function getMultipleChildren(array $paths) {
68
-		$objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
69
-		$children = [];
70
-		foreach ($objs as $obj) {
71
-			if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
72
-				continue;
73
-			}
74
-			$obj['acl'] = $this->getChildACL();
75
-			$children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
76
-		}
77
-		return $children;
78
-	}
63
+    /**
64
+     * @param string[] $paths
65
+     * @return PublicCalendarObject[]
66
+     */
67
+    public function getMultipleChildren(array $paths) {
68
+        $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths);
69
+        $children = [];
70
+        foreach ($objs as $obj) {
71
+            if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) {
72
+                continue;
73
+            }
74
+            $obj['acl'] = $this->getChildACL();
75
+            $children[] = new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj);
76
+        }
77
+        return $children;
78
+    }
79 79
 
80
-	/**
81
-	 * public calendars are always shared
82
-	 * @return bool
83
-	 */
84
-	protected function isShared() {
85
-		return true;
86
-	}
80
+    /**
81
+     * public calendars are always shared
82
+     * @return bool
83
+     */
84
+    protected function isShared() {
85
+        return true;
86
+    }
87 87
 }
Please login to merge, or discard this patch.
apps/federation/lib/DAV/FedAuth.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -29,40 +29,40 @@
 block discarded – undo
29 29
 
30 30
 class FedAuth extends AbstractBasic {
31 31
 
32
-	/** @var DbHandler */
33
-	private $db;
32
+    /** @var DbHandler */
33
+    private $db;
34 34
 
35
-	/**
36
-	 * FedAuth constructor.
37
-	 *
38
-	 * @param DbHandler $db
39
-	 */
40
-	public function __construct(DbHandler $db) {
41
-		$this->db = $db;
42
-		$this->principalPrefix = 'principals/system/';
35
+    /**
36
+     * FedAuth constructor.
37
+     *
38
+     * @param DbHandler $db
39
+     */
40
+    public function __construct(DbHandler $db) {
41
+        $this->db = $db;
42
+        $this->principalPrefix = 'principals/system/';
43 43
 
44
-		// setup realm
45
-		$defaults = new \OCP\Defaults();
46
-		$this->realm = $defaults->getName();
47
-	}
44
+        // setup realm
45
+        $defaults = new \OCP\Defaults();
46
+        $this->realm = $defaults->getName();
47
+    }
48 48
 
49
-	/**
50
-	 * Validates a username and password
51
-	 *
52
-	 * This method should return true or false depending on if login
53
-	 * succeeded.
54
-	 *
55
-	 * @param string $username
56
-	 * @param string $password
57
-	 * @return bool
58
-	 */
59
-	protected function validateUserPass($username, $password) {
60
-		return $this->db->auth($username, $password);
61
-	}
49
+    /**
50
+     * Validates a username and password
51
+     *
52
+     * This method should return true or false depending on if login
53
+     * succeeded.
54
+     *
55
+     * @param string $username
56
+     * @param string $password
57
+     * @return bool
58
+     */
59
+    protected function validateUserPass($username, $password) {
60
+        return $this->db->auth($username, $password);
61
+    }
62 62
 
63
-	/**
64
-	 * @inheritdoc
65
-	 */
66
-	public function challenge(RequestInterface $request, ResponseInterface $response) {
67
-	}
63
+    /**
64
+     * @inheritdoc
65
+     */
66
+    public function challenge(RequestInterface $request, ResponseInterface $response) {
67
+    }
68 68
 }
Please login to merge, or discard this patch.
apps/provisioning_api/lib/Middleware/Exceptions/NotSubAdminException.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use OCP\AppFramework\Http;
6 6
 
7 7
 class NotSubAdminException extends \Exception {
8
-	public function __construct() {
9
-		parent::__construct('Logged in user must be at least a sub admin', Http::STATUS_FORBIDDEN);
10
-	}
8
+    public function __construct() {
9
+        parent::__construct('Logged in user must be at least a sub admin', Http::STATUS_FORBIDDEN);
10
+    }
11 11
 }
Please login to merge, or discard this patch.
lib/private/L10N/L10NString.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
 				$fn = $this->l10n->getPluralFormFunction();
62 62
 				$id = $fn($this->count);
63 63
 				$text = $translations[$this->text][$id];
64
-			}
65
-			else{
64
+			} else{
66 65
 				$text = $translations[$this->text];
67 66
 			}
68 67
 		}
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -29,59 +29,59 @@
 block discarded – undo
29 29
 namespace OC\L10N;
30 30
 
31 31
 class L10NString implements \JsonSerializable {
32
-	/** @var \OC\L10N\L10N */
33
-	protected $l10n;
32
+    /** @var \OC\L10N\L10N */
33
+    protected $l10n;
34 34
 
35
-	/** @var string */
36
-	protected $text;
35
+    /** @var string */
36
+    protected $text;
37 37
 
38
-	/** @var array */
39
-	protected $parameters;
38
+    /** @var array */
39
+    protected $parameters;
40 40
 
41
-	/** @var integer */
42
-	protected $count;
41
+    /** @var integer */
42
+    protected $count;
43 43
 
44
-	/**
45
-	 * @param \OC\L10N\L10N $l10n
46
-	 * @param string|string[] $text
47
-	 * @param array $parameters
48
-	 * @param int $count
49
-	 */
50
-	public function __construct(\OC\L10N\L10N $l10n, $text, $parameters, $count = 1) {
51
-		$this->l10n = $l10n;
52
-		$this->text = $text;
53
-		$this->parameters = $parameters;
54
-		$this->count = $count;
55
-	}
44
+    /**
45
+     * @param \OC\L10N\L10N $l10n
46
+     * @param string|string[] $text
47
+     * @param array $parameters
48
+     * @param int $count
49
+     */
50
+    public function __construct(\OC\L10N\L10N $l10n, $text, $parameters, $count = 1) {
51
+        $this->l10n = $l10n;
52
+        $this->text = $text;
53
+        $this->parameters = $parameters;
54
+        $this->count = $count;
55
+    }
56 56
 
57
-	/**
58
-	 * @return string
59
-	 */
60
-	public function __toString() {
61
-		$translations = $this->l10n->getTranslations();
57
+    /**
58
+     * @return string
59
+     */
60
+    public function __toString() {
61
+        $translations = $this->l10n->getTranslations();
62 62
 
63
-		$text = $this->text;
64
-		if(array_key_exists($this->text, $translations)) {
65
-			if(is_array($translations[$this->text])) {
66
-				$fn = $this->l10n->getPluralFormFunction();
67
-				$id = $fn($this->count);
68
-				$text = $translations[$this->text][$id];
69
-			}
70
-			else{
71
-				$text = $translations[$this->text];
72
-			}
73
-		}
63
+        $text = $this->text;
64
+        if(array_key_exists($this->text, $translations)) {
65
+            if(is_array($translations[$this->text])) {
66
+                $fn = $this->l10n->getPluralFormFunction();
67
+                $id = $fn($this->count);
68
+                $text = $translations[$this->text][$id];
69
+            }
70
+            else{
71
+                $text = $translations[$this->text];
72
+            }
73
+        }
74 74
 
75
-		// Replace %n first (won't interfere with vsprintf)
76
-		$text = str_replace('%n', (string)$this->count, $text);
77
-		return vsprintf($text, $this->parameters);
78
-	}
75
+        // Replace %n first (won't interfere with vsprintf)
76
+        $text = str_replace('%n', (string)$this->count, $text);
77
+        return vsprintf($text, $this->parameters);
78
+    }
79 79
 
80 80
 
81
-	/**
82
-	 * @return string
83
-	 */
84
-	public function jsonSerialize() {
85
-		return $this->__toString();
86
-	}
81
+    /**
82
+     * @return string
83
+     */
84
+    public function jsonSerialize() {
85
+        return $this->__toString();
86
+    }
87 87
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,19 +56,19 @@
 block discarded – undo
56 56
 		$translations = $this->l10n->getTranslations();
57 57
 
58 58
 		$text = $this->text;
59
-		if(array_key_exists($this->text, $translations)) {
60
-			if(is_array($translations[$this->text])) {
59
+		if (array_key_exists($this->text, $translations)) {
60
+			if (is_array($translations[$this->text])) {
61 61
 				$fn = $this->l10n->getPluralFormFunction();
62 62
 				$id = $fn($this->count);
63 63
 				$text = $translations[$this->text][$id];
64 64
 			}
65
-			else{
65
+			else {
66 66
 				$text = $translations[$this->text];
67 67
 			}
68 68
 		}
69 69
 
70 70
 		// Replace %n first (won't interfere with vsprintf)
71
-		$text = str_replace('%n', (string)$this->count, $text);
71
+		$text = str_replace('%n', (string) $this->count, $text);
72 72
 		return vsprintf($text, $this->parameters);
73 73
 	}
74 74
 
Please login to merge, or discard this patch.