Completed
Pull Request — master (#8780)
by Joas
58:54 queued 36:22
created
lib/private/Group/Group.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,8 +222,8 @@
 block discarded – undo
222 222
 	public function count($search = '') {
223 223
 		$users = false;
224 224
 		foreach ($this->backends as $backend) {
225
-			if($backend->implementsActions(\OC\Group\Backend::COUNT_USERS)) {
226
-				if($users === false) {
225
+			if ($backend->implementsActions(\OC\Group\Backend::COUNT_USERS)) {
226
+				if ($users === false) {
227 227
 					//we could directly add to a bool variable, but this would
228 228
 					//be ugly
229 229
 					$users = 0;
Please login to merge, or discard this patch.
lib/private/Group/MetaData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 			IUserSession $userSession
61 61
 			) {
62 62
 		$this->user = $user;
63
-		$this->isAdmin = (bool)$isAdmin;
63
+		$this->isAdmin = (bool) $isAdmin;
64 64
 		$this->groupManager = $groupManager;
65 65
 		$this->userSession = $userSession;
66 66
 	}
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
 	 * @return array
77 77
 	 */
78 78
 	public function get($groupSearch = '', $userSearch = '') {
79
-		$key = $groupSearch . '::' . $userSearch;
80
-		if(isset($this->metaData[$key])) {
79
+		$key = $groupSearch.'::'.$userSearch;
80
+		if (isset($this->metaData[$key])) {
81 81
 			return $this->metaData[$key];
82 82
 		}
83 83
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 		$sortAdminGroupsIndex = 0;
89 89
 		$sortAdminGroupsKeys = array();
90 90
 
91
-		foreach($this->getGroups($groupSearch) as $group) {
91
+		foreach ($this->getGroups($groupSearch) as $group) {
92 92
 			$groupMetaData = $this->generateGroupMetaData($group, $userSearch);
93 93
 			if (strtolower($group->getGID()) !== 'admin') {
94 94
 				$this->addEntry(
@@ -185,11 +185,11 @@  discard block
 block discarded – undo
185 185
 	 * @return \OCP\IGroup[]
186 186
 	 */
187 187
 	protected function getGroups($search = '') {
188
-		if($this->isAdmin) {
188
+		if ($this->isAdmin) {
189 189
 			return $this->groupManager->search($search);
190 190
 		} else {
191 191
 			$userObject = $this->userSession->getUser();
192
-			if($userObject !== null) {
192
+			if ($userObject !== null) {
193 193
 				$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($userObject);
194 194
 			} else {
195 195
 				$groups = [];
Please login to merge, or discard this patch.
lib/private/Group/Backend.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 	*/
50 50
 	public function getSupportedActions() {
51 51
 		$actions = 0;
52
-		foreach($this->possibleActions AS $action => $methodName) {
53
-			if(method_exists($this, $methodName)) {
52
+		foreach ($this->possibleActions AS $action => $methodName) {
53
+			if (method_exists($this, $methodName)) {
54 54
 				$actions |= $action;
55 55
 			}
56 56
 		}
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 	* compared with \OC\Group\Backend::CREATE_GROUP etc.
68 68
 	*/
69 69
 	public function implementsActions($actions) {
70
-		return (bool)($this->getSupportedActions() & $actions);
70
+		return (bool) ($this->getSupportedActions() & $actions);
71 71
 	}
72 72
 
73 73
 	/**
Please login to merge, or discard this patch.
ocs/v2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,4 +20,4 @@
 block discarded – undo
20 20
  *
21 21
  */
22 22
 
23
-require_once __DIR__ . '/v1.php';
23
+require_once __DIR__.'/v1.php';
Please login to merge, or discard this patch.
ocs-provider/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
  *
20 20
  */
21 21
 
22
-require_once __DIR__ . '/../lib/base.php';
22
+require_once __DIR__.'/../lib/base.php';
23 23
 
24 24
 header('Content-Type: application/json');
25 25
 
Please login to merge, or discard this patch.
core/templates/update.admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 		<p id="update-progress-message-error" class="hidden"></p>
50 50
 		<ul id="update-progress-message-warnings" class="hidden"></ul>
51 51
 		<p id="update-progress-message"></p>
52
-		<a class="update-show-detailed"><?php p($l->t( 'Detailed logs' )); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
52
+		<a class="update-show-detailed"><?php p($l->t('Detailed logs')); ?> <img src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" /></a>
53 53
 		<div id="update-progress-detailed" class="hidden"></div>
54 54
 	</div>
55 55
 </div>
Please login to merge, or discard this patch.
core/Controller/SetupController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@  discard block
 block discarded – undo
60 60
 			$post['dbpass'] = $post['dbpassword'];
61 61
 		}
62 62
 
63
-		if(isset($post['install']) AND $post['install']=='true') {
63
+		if (isset($post['install']) AND $post['install'] == 'true') {
64 64
 			// We have to launch the installation process :
65 65
 			$e = $this->setupHelper->install($post);
66 66
 			$errors = array('errors' => $e);
67 67
 
68
-			if(count($e) > 0) {
68
+			if (count($e) > 0) {
69 69
 				$options = array_merge($opts, $post, $errors);
70 70
 				$this->display($options);
71 71
 			} else {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 
99 99
 	public function finishSetup() {
100
-		if( file_exists( $this->autoConfigFile )) {
100
+		if (file_exists($this->autoConfigFile)) {
101 101
 			unlink($this->autoConfigFile);
102 102
 		}
103 103
 		\OC::$server->getIntegrityCodeChecker()->runInstanceVerification();
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	public function loadAutoConfig($post) {
108
-		if( file_exists($this->autoConfigFile)) {
108
+		if (file_exists($this->autoConfigFile)) {
109 109
 			\OCP\Util::writeLog('core', 'Autoconfig file found, setting up ownCloud…', \OCP\Util::INFO);
110 110
 			$AUTOCONFIG = array();
111 111
 			include $this->autoConfigFile;
112
-			$post = array_merge ($post, $AUTOCONFIG);
112
+			$post = array_merge($post, $AUTOCONFIG);
113 113
 		}
114 114
 
115 115
 		$dbIsSet = isset($post['dbtype']);
Please login to merge, or discard this patch.
core/Command/Security/ListCertificates.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	protected function execute(InputInterface $input, OutputInterface $output) {
56 56
 		$outputType = $input->getOption('output');
57 57
 		if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) {
58
-			$certificates = array_map(function (ICertificate $certificate) {
58
+			$certificates = array_map(function(ICertificate $certificate) {
59 59
 				return [
60 60
 					'name' => $certificate->getName(),
61 61
 					'common_name' => $certificate->getCommonName(),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 				'Issued By'
82 82
 			]);
83 83
 
84
-			$rows = array_map(function (ICertificate $certificate) {
84
+			$rows = array_map(function(ICertificate $certificate) {
85 85
 				return [
86 86
 					$certificate->getName(),
87 87
 					$certificate->getCommonName(),
Please login to merge, or discard this patch.
core/Command/Integrity/SignCore.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		$privateKeyPath = $input->getOption('privateKey');
70 70
 		$keyBundlePath = $input->getOption('certificate');
71 71
 		$path = $input->getOption('path');
72
-		if(is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) {
72
+		if (is_null($privateKeyPath) || is_null($keyBundlePath) || is_null($path)) {
73 73
 			$output->writeln('--privateKey, --certificate and --path are required.');
74 74
 			return null;
75 75
 		}
@@ -77,12 +77,12 @@  discard block
 block discarded – undo
77 77
 		$privateKey = $this->fileAccessHelper->file_get_contents($privateKeyPath);
78 78
 		$keyBundle = $this->fileAccessHelper->file_get_contents($keyBundlePath);
79 79
 
80
-		if($privateKey === false) {
80
+		if ($privateKey === false) {
81 81
 			$output->writeln(sprintf('Private key "%s" does not exists.', $privateKeyPath));
82 82
 			return null;
83 83
 		}
84 84
 
85
-		if($keyBundle === false) {
85
+		if ($keyBundle === false) {
86 86
 			$output->writeln(sprintf('Certificate "%s" does not exists.', $keyBundlePath));
87 87
 			return null;
88 88
 		}
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
 		try {
97 97
 			$this->checker->writeCoreSignature($x509, $rsa, $path);
98 98
 			$output->writeln('Successfully signed "core"');
99
-		} catch (\Exception $e){
100
-			$output->writeln('Error: ' . $e->getMessage());
99
+		} catch (\Exception $e) {
100
+			$output->writeln('Error: '.$e->getMessage());
101 101
 			return 1;
102 102
 		}
103 103
 		return 0;
Please login to merge, or discard this patch.