Passed
Push — master ( b6c034...979f40 )
by John
40:53 queued 23:59
created
lib/private/Hooks/Emitter.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -34,21 +34,21 @@
 block discarded – undo
34 34
  * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
35 35
  */
36 36
 interface Emitter {
37
-	/**
38
-	 * @param string $scope
39
-	 * @param string $method
40
-	 * @param callable $callback
41
-	 * @return void
42
-	 * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
43
-	 */
44
-	public function listen($scope, $method, callable $callback);
37
+    /**
38
+     * @param string $scope
39
+     * @param string $method
40
+     * @param callable $callback
41
+     * @return void
42
+     * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener
43
+     */
44
+    public function listen($scope, $method, callable $callback);
45 45
 
46
-	/**
47
-	 * @param string $scope optional
48
-	 * @param string $method optional
49
-	 * @param callable $callback optional
50
-	 * @return void
51
-	 * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
52
-	 */
53
-	public function removeListener($scope = null, $method = null, callable $callback = null);
46
+    /**
47
+     * @param string $scope optional
48
+     * @param string $method optional
49
+     * @param callable $callback optional
50
+     * @return void
51
+     * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener
52
+     */
53
+    public function removeListener($scope = null, $method = null, callable $callback = null);
54 54
 }
Please login to merge, or discard this patch.
lib/private/Hooks/PublicEmitter.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,15 +29,15 @@
 block discarded – undo
29 29
  * @deprecated 18.0.0 use events and the \OCP\EventDispatcher\IEventDispatcher service
30 30
  */
31 31
 class PublicEmitter extends BasicEmitter {
32
-	/**
33
-	 * @param string $scope
34
-	 * @param string $method
35
-	 * @param array $arguments optional
36
-	 * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
37
-	 *
38
-	 * @suppress PhanAccessMethodProtected
39
-	 */
40
-	public function emit($scope, $method, array $arguments = []) {
41
-		parent::emit($scope, $method, $arguments);
42
-	}
32
+    /**
33
+     * @param string $scope
34
+     * @param string $method
35
+     * @param array $arguments optional
36
+     * @deprecated 18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped
37
+     *
38
+     * @suppress PhanAccessMethodProtected
39
+     */
40
+    public function emit($scope, $method, array $arguments = []) {
41
+        parent::emit($scope, $method, $arguments);
42
+    }
43 43
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Events/GroupBackendRegistered.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
  */
38 38
 class GroupBackendRegistered extends Event {
39 39
 
40
-	/** @var GroupPluginManager */
41
-	private $pluginManager;
42
-	/** @var IGroupLDAP */
43
-	private $backend;
44
-
45
-	public function __construct(IGroupLDAP $backend, GroupPluginManager $pluginManager) {
46
-		$this->pluginManager = $pluginManager;
47
-		$this->backend = $backend;
48
-	}
49
-
50
-	public function getBackend(): IGroupLDAP {
51
-		return $this->backend;
52
-	}
53
-
54
-	public function getPluginManager(): GroupPluginManager {
55
-		return $this->pluginManager;
56
-	}
40
+    /** @var GroupPluginManager */
41
+    private $pluginManager;
42
+    /** @var IGroupLDAP */
43
+    private $backend;
44
+
45
+    public function __construct(IGroupLDAP $backend, GroupPluginManager $pluginManager) {
46
+        $this->pluginManager = $pluginManager;
47
+        $this->backend = $backend;
48
+    }
49
+
50
+    public function getBackend(): IGroupLDAP {
51
+        return $this->backend;
52
+    }
53
+
54
+    public function getPluginManager(): GroupPluginManager {
55
+        return $this->pluginManager;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
apps/user_ldap/lib/Events/UserBackendRegistered.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
  */
38 38
 class UserBackendRegistered extends Event {
39 39
 
40
-	/** @var IUserLDAP */
41
-	private $backend;
42
-	/** @var UserPluginManager */
43
-	private $pluginManager;
44
-
45
-	public function __construct(IUserLDAP $backend, UserPluginManager $pluginManager) {
46
-		$this->backend = $backend;
47
-		$this->pluginManager = $pluginManager;
48
-	}
49
-
50
-	public function getBackend(): IUserLDAP {
51
-		return $this->backend;
52
-	}
53
-
54
-	public function getPluginManager(): UserPluginManager {
55
-		return $this->pluginManager;
56
-	}
40
+    /** @var IUserLDAP */
41
+    private $backend;
42
+    /** @var UserPluginManager */
43
+    private $pluginManager;
44
+
45
+    public function __construct(IUserLDAP $backend, UserPluginManager $pluginManager) {
46
+        $this->backend = $backend;
47
+        $this->pluginManager = $pluginManager;
48
+    }
49
+
50
+    public function getBackend(): IUserLDAP {
51
+        return $this->backend;
52
+    }
53
+
54
+    public function getPluginManager(): UserPluginManager {
55
+        return $this->pluginManager;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
apps/lookup_server_connector/lib/AppInfo/Application.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -41,31 +41,31 @@
 block discarded – undo
41 41
 use Symfony\Component\EventDispatcher\GenericEvent;
42 42
 
43 43
 class Application extends App implements IBootstrap {
44
-	public const APP_ID = 'lookup_server_connector';
44
+    public const APP_ID = 'lookup_server_connector';
45 45
 
46
-	public function __construct() {
47
-		parent::__construct(self::APP_ID);
48
-	}
46
+    public function __construct() {
47
+        parent::__construct(self::APP_ID);
48
+    }
49 49
 
50
-	public function register(IRegistrationContext $context): void {
51
-	}
50
+    public function register(IRegistrationContext $context): void {
51
+    }
52 52
 
53
-	public function boot(IBootContext $context): void {
54
-		$context->injectFn(Closure::fromCallable([$this, 'registerEventListeners']));
55
-	}
53
+    public function boot(IBootContext $context): void {
54
+        $context->injectFn(Closure::fromCallable([$this, 'registerEventListeners']));
55
+    }
56 56
 
57
-	/**
58
-	 * @todo move the OCP events and then move the registration to `register`
59
-	 */
60
-	private function registerEventListeners(EventDispatcher $dispatcher,
61
-											IAppContainer $appContainer): void {
62
-		$dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($appContainer) {
63
-			/** @var IUser $user */
64
-			$user = $event->getSubject();
57
+    /**
58
+     * @todo move the OCP events and then move the registration to `register`
59
+     */
60
+    private function registerEventListeners(EventDispatcher $dispatcher,
61
+                                            IAppContainer $appContainer): void {
62
+        $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($appContainer) {
63
+            /** @var IUser $user */
64
+            $user = $event->getSubject();
65 65
 
66
-			/** @var UpdateLookupServer $updateLookupServer */
67
-			$updateLookupServer = $appContainer->get(UpdateLookupServer::class);
68
-			$updateLookupServer->userUpdated($user);
69
-		});
70
-	}
66
+            /** @var UpdateLookupServer $updateLookupServer */
67
+            $updateLookupServer = $appContainer->get(UpdateLookupServer::class);
68
+            $updateLookupServer->userUpdated($user);
69
+        });
70
+    }
71 71
 }
Please login to merge, or discard this patch.
lib/private/DB/OracleConnection.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -28,80 +28,80 @@
 block discarded – undo
28 28
 namespace OC\DB;
29 29
 
30 30
 class OracleConnection extends Connection {
31
-	/**
32
-	 * Quote the keys of the array
33
-	 */
34
-	private function quoteKeys(array $data) {
35
-		$return = [];
36
-		$c = $this->getDatabasePlatform()->getIdentifierQuoteCharacter();
37
-		foreach ($data as $key => $value) {
38
-			if ($key[0] !== $c) {
39
-				$return[$this->quoteIdentifier($key)] = $value;
40
-			} else {
41
-				$return[$key] = $value;
42
-			}
43
-		}
44
-		return $return;
45
-	}
31
+    /**
32
+     * Quote the keys of the array
33
+     */
34
+    private function quoteKeys(array $data) {
35
+        $return = [];
36
+        $c = $this->getDatabasePlatform()->getIdentifierQuoteCharacter();
37
+        foreach ($data as $key => $value) {
38
+            if ($key[0] !== $c) {
39
+                $return[$this->quoteIdentifier($key)] = $value;
40
+            } else {
41
+                $return[$key] = $value;
42
+            }
43
+        }
44
+        return $return;
45
+    }
46 46
 
47
-	/**
48
-	 * {@inheritDoc}
49
-	 */
50
-	public function insert($table, array $data, array $types = []) {
51
-		if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
52
-			$table = $this->quoteIdentifier($table);
53
-		}
54
-		$data = $this->quoteKeys($data);
55
-		return parent::insert($table, $data, $types);
56
-	}
47
+    /**
48
+     * {@inheritDoc}
49
+     */
50
+    public function insert($table, array $data, array $types = []) {
51
+        if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
52
+            $table = $this->quoteIdentifier($table);
53
+        }
54
+        $data = $this->quoteKeys($data);
55
+        return parent::insert($table, $data, $types);
56
+    }
57 57
 
58
-	/**
59
-	 * {@inheritDoc}
60
-	 */
61
-	public function update($table, array $data, array $criteria, array $types = []) {
62
-		if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
63
-			$table = $this->quoteIdentifier($table);
64
-		}
65
-		$data = $this->quoteKeys($data);
66
-		$criteria = $this->quoteKeys($criteria);
67
-		return parent::update($table, $data, $criteria, $types);
68
-	}
58
+    /**
59
+     * {@inheritDoc}
60
+     */
61
+    public function update($table, array $data, array $criteria, array $types = []) {
62
+        if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
63
+            $table = $this->quoteIdentifier($table);
64
+        }
65
+        $data = $this->quoteKeys($data);
66
+        $criteria = $this->quoteKeys($criteria);
67
+        return parent::update($table, $data, $criteria, $types);
68
+    }
69 69
 
70
-	/**
71
-	 * {@inheritDoc}
72
-	 */
73
-	public function delete($table, array $criteria, array $types = []) {
74
-		if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
75
-			$table = $this->quoteIdentifier($table);
76
-		}
77
-		$criteria = $this->quoteKeys($criteria);
78
-		return parent::delete($table, $criteria);
79
-	}
70
+    /**
71
+     * {@inheritDoc}
72
+     */
73
+    public function delete($table, array $criteria, array $types = []) {
74
+        if ($table[0] !== $this->getDatabasePlatform()->getIdentifierQuoteCharacter()) {
75
+            $table = $this->quoteIdentifier($table);
76
+        }
77
+        $criteria = $this->quoteKeys($criteria);
78
+        return parent::delete($table, $criteria);
79
+    }
80 80
 
81
-	/**
82
-	 * Drop a table from the database if it exists
83
-	 *
84
-	 * @param string $table table name without the prefix
85
-	 */
86
-	public function dropTable($table) {
87
-		$table = $this->tablePrefix . trim($table);
88
-		$table = $this->quoteIdentifier($table);
89
-		$schema = $this->getSchemaManager();
90
-		if ($schema->tablesExist([$table])) {
91
-			$schema->dropTable($table);
92
-		}
93
-	}
81
+    /**
82
+     * Drop a table from the database if it exists
83
+     *
84
+     * @param string $table table name without the prefix
85
+     */
86
+    public function dropTable($table) {
87
+        $table = $this->tablePrefix . trim($table);
88
+        $table = $this->quoteIdentifier($table);
89
+        $schema = $this->getSchemaManager();
90
+        if ($schema->tablesExist([$table])) {
91
+            $schema->dropTable($table);
92
+        }
93
+    }
94 94
 
95
-	/**
96
-	 * Check if a table exists
97
-	 *
98
-	 * @param string $table table name without the prefix
99
-	 * @return bool
100
-	 */
101
-	public function tableExists($table) {
102
-		$table = $this->tablePrefix . trim($table);
103
-		$table = $this->quoteIdentifier($table);
104
-		$schema = $this->getSchemaManager();
105
-		return $schema->tablesExist([$table]);
106
-	}
95
+    /**
96
+     * Check if a table exists
97
+     *
98
+     * @param string $table table name without the prefix
99
+     * @return bool
100
+     */
101
+    public function tableExists($table) {
102
+        $table = $this->tablePrefix . trim($table);
103
+        $table = $this->quoteIdentifier($table);
104
+        $schema = $this->getSchemaManager();
105
+        return $schema->tablesExist([$table]);
106
+    }
107 107
 }
Please login to merge, or discard this patch.
lib/private/Session/CryptoWrapper.php 1 patch
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -49,70 +49,70 @@
 block discarded – undo
49 49
  * @package OC\Session
50 50
  */
51 51
 class CryptoWrapper {
52
-	public const COOKIE_NAME = 'oc_sessionPassphrase';
52
+    public const COOKIE_NAME = 'oc_sessionPassphrase';
53 53
 
54
-	/** @var IConfig */
55
-	protected $config;
56
-	/** @var ISession */
57
-	protected $session;
58
-	/** @var ICrypto */
59
-	protected $crypto;
60
-	/** @var ISecureRandom */
61
-	protected $random;
62
-	/** @var string */
63
-	protected $passphrase;
54
+    /** @var IConfig */
55
+    protected $config;
56
+    /** @var ISession */
57
+    protected $session;
58
+    /** @var ICrypto */
59
+    protected $crypto;
60
+    /** @var ISecureRandom */
61
+    protected $random;
62
+    /** @var string */
63
+    protected $passphrase;
64 64
 
65
-	/**
66
-	 * @param IConfig $config
67
-	 * @param ICrypto $crypto
68
-	 * @param ISecureRandom $random
69
-	 * @param IRequest $request
70
-	 */
71
-	public function __construct(IConfig $config,
72
-								ICrypto $crypto,
73
-								ISecureRandom $random,
74
-								IRequest $request) {
75
-		$this->crypto = $crypto;
76
-		$this->config = $config;
77
-		$this->random = $random;
65
+    /**
66
+     * @param IConfig $config
67
+     * @param ICrypto $crypto
68
+     * @param ISecureRandom $random
69
+     * @param IRequest $request
70
+     */
71
+    public function __construct(IConfig $config,
72
+                                ICrypto $crypto,
73
+                                ISecureRandom $random,
74
+                                IRequest $request) {
75
+        $this->crypto = $crypto;
76
+        $this->config = $config;
77
+        $this->random = $random;
78 78
 
79
-		if (!is_null($request->getCookie(self::COOKIE_NAME))) {
80
-			$this->passphrase = $request->getCookie(self::COOKIE_NAME);
81
-		} else {
82
-			$this->passphrase = $this->random->generate(128);
83
-			$secureCookie = $request->getServerProtocol() === 'https';
84
-			// FIXME: Required for CI
85
-			if (!defined('PHPUNIT_RUN')) {
86
-				$webRoot = \OC::$WEBROOT;
87
-				if ($webRoot === '') {
88
-					$webRoot = '/';
89
-				}
79
+        if (!is_null($request->getCookie(self::COOKIE_NAME))) {
80
+            $this->passphrase = $request->getCookie(self::COOKIE_NAME);
81
+        } else {
82
+            $this->passphrase = $this->random->generate(128);
83
+            $secureCookie = $request->getServerProtocol() === 'https';
84
+            // FIXME: Required for CI
85
+            if (!defined('PHPUNIT_RUN')) {
86
+                $webRoot = \OC::$WEBROOT;
87
+                if ($webRoot === '') {
88
+                    $webRoot = '/';
89
+                }
90 90
 
91
-				setcookie(
92
-					self::COOKIE_NAME,
93
-					$this->passphrase,
94
-					[
95
-						'expires' => 0,
96
-						'path' => $webRoot,
97
-						'domain' => '',
98
-						'secure' => $secureCookie,
99
-						'httponly' => true,
100
-						'samesite' => 'Lax',
101
-					]
102
-				);
103
-			}
104
-		}
105
-	}
91
+                setcookie(
92
+                    self::COOKIE_NAME,
93
+                    $this->passphrase,
94
+                    [
95
+                        'expires' => 0,
96
+                        'path' => $webRoot,
97
+                        'domain' => '',
98
+                        'secure' => $secureCookie,
99
+                        'httponly' => true,
100
+                        'samesite' => 'Lax',
101
+                    ]
102
+                );
103
+            }
104
+        }
105
+    }
106 106
 
107
-	/**
108
-	 * @param ISession $session
109
-	 * @return ISession
110
-	 */
111
-	public function wrapSession(ISession $session) {
112
-		if (!($session instanceof CryptoSessionData)) {
113
-			return new CryptoSessionData($session, $this->crypto, $this->passphrase);
114
-		}
107
+    /**
108
+     * @param ISession $session
109
+     * @return ISession
110
+     */
111
+    public function wrapSession(ISession $session) {
112
+        if (!($session instanceof CryptoSessionData)) {
113
+            return new CryptoSessionData($session, $this->crypto, $this->passphrase);
114
+        }
115 115
 
116
-		return $session;
117
-	}
116
+        return $session;
117
+    }
118 118
 }
Please login to merge, or discard this patch.
lib/private/AppFramework/Http/Output.php 1 patch
Indentation   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -32,77 +32,77 @@
 block discarded – undo
32 32
  * Very thin wrapper class to make output testable
33 33
  */
34 34
 class Output implements IOutput {
35
-	/** @var string */
36
-	private $webRoot;
35
+    /** @var string */
36
+    private $webRoot;
37 37
 
38
-	/**
39
-	 * @param $webRoot
40
-	 */
41
-	public function __construct($webRoot) {
42
-		$this->webRoot = $webRoot;
43
-	}
38
+    /**
39
+     * @param $webRoot
40
+     */
41
+    public function __construct($webRoot) {
42
+        $this->webRoot = $webRoot;
43
+    }
44 44
 
45
-	/**
46
-	 * @param string $out
47
-	 */
48
-	public function setOutput($out) {
49
-		print($out);
50
-	}
45
+    /**
46
+     * @param string $out
47
+     */
48
+    public function setOutput($out) {
49
+        print($out);
50
+    }
51 51
 
52
-	/**
53
-	 * @param string|resource $path or file handle
54
-	 *
55
-	 * @return bool false if an error occurred
56
-	 */
57
-	public function setReadfile($path) {
58
-		if (is_resource($path)) {
59
-			$output = fopen('php://output', 'w');
60
-			return stream_copy_to_stream($path, $output) > 0;
61
-		} else {
62
-			return @readfile($path);
63
-		}
64
-	}
52
+    /**
53
+     * @param string|resource $path or file handle
54
+     *
55
+     * @return bool false if an error occurred
56
+     */
57
+    public function setReadfile($path) {
58
+        if (is_resource($path)) {
59
+            $output = fopen('php://output', 'w');
60
+            return stream_copy_to_stream($path, $output) > 0;
61
+        } else {
62
+            return @readfile($path);
63
+        }
64
+    }
65 65
 
66
-	/**
67
-	 * @param string $header
68
-	 */
69
-	public function setHeader($header) {
70
-		header($header);
71
-	}
66
+    /**
67
+     * @param string $header
68
+     */
69
+    public function setHeader($header) {
70
+        header($header);
71
+    }
72 72
 
73
-	/**
74
-	 * @param int $code sets the http status code
75
-	 */
76
-	public function setHttpResponseCode($code) {
77
-		http_response_code($code);
78
-	}
73
+    /**
74
+     * @param int $code sets the http status code
75
+     */
76
+    public function setHttpResponseCode($code) {
77
+        http_response_code($code);
78
+    }
79 79
 
80
-	/**
81
-	 * @return int returns the current http response code
82
-	 */
83
-	public function getHttpResponseCode() {
84
-		return http_response_code();
85
-	}
80
+    /**
81
+     * @return int returns the current http response code
82
+     */
83
+    public function getHttpResponseCode() {
84
+        return http_response_code();
85
+    }
86 86
 
87
-	/**
88
-	 * @param string $name
89
-	 * @param string $value
90
-	 * @param int $expire
91
-	 * @param string $path
92
-	 * @param string $domain
93
-	 * @param bool $secure
94
-	 * @param bool $httpOnly
95
-	 */
96
-	public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') {
97
-		$path = $this->webRoot ? : '/';
87
+    /**
88
+     * @param string $name
89
+     * @param string $value
90
+     * @param int $expire
91
+     * @param string $path
92
+     * @param string $domain
93
+     * @param bool $secure
94
+     * @param bool $httpOnly
95
+     */
96
+    public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax') {
97
+        $path = $this->webRoot ? : '/';
98 98
 
99
-		setcookie($name, $value, [
100
-			'expires' => $expire,
101
-			'path' => $path,
102
-			'domain' => $domain,
103
-			'secure' => $secure,
104
-			'httponly' => $httpOnly,
105
-			'samesite' => $sameSite
106
-		]);
107
-	}
99
+        setcookie($name, $value, [
100
+            'expires' => $expire,
101
+            'path' => $path,
102
+            'domain' => $domain,
103
+            'secure' => $secure,
104
+            'httponly' => $httpOnly,
105
+            'samesite' => $sameSite
106
+        ]);
107
+    }
108 108
 }
Please login to merge, or discard this patch.
apps/user_ldap/ajax/deleteConfiguration.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@
 block discarded – undo
34 34
 $prefix = (string)$_POST['ldap_serverconfig_chooser'];
35 35
 $helper = new \OCA\User_LDAP\Helper(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection());
36 36
 if ($helper->deleteServerConfiguration($prefix)) {
37
-	\OC_JSON::success();
37
+    \OC_JSON::success();
38 38
 } else {
39
-	$l = \OC::$server->getL10N('user_ldap');
40
-	\OC_JSON::error(['message' => $l->t('Failed to delete the server configuration')]);
39
+    $l = \OC::$server->getL10N('user_ldap');
40
+    \OC_JSON::error(['message' => $l->t('Failed to delete the server configuration')]);
41 41
 }
Please login to merge, or discard this patch.