@@ -164,7 +164,7 @@ |
||
| 164 | 164 | * @since 14.0.0 |
| 165 | 165 | */ |
| 166 | 166 | public function render(): string { |
| 167 | - $detailContent = ($this->detail !== '') ? ' <span class="download-size">(' . Util::sanitizeHTML($this->detail) . ')</span>' : ''; |
|
| 167 | + $detailContent = ($this->detail !== '') ? ' <span class="download-size">('.Util::sanitizeHTML($this->detail).')</span>' : ''; |
|
| 168 | 168 | return sprintf( |
| 169 | 169 | '<li id="%s"><a href="%s"><span class="icon %s"></span>%s %s</a></li>', |
| 170 | 170 | Util::sanitizeHTML($this->id), Util::sanitizeHTML($this->link), Util::sanitizeHTML($this->icon), Util::sanitizeHTML($this->label), $detailContent |
@@ -57,17 +57,17 @@ |
||
| 57 | 57 | $result = ['wide' => [], 'exact' => []]; |
| 58 | 58 | |
| 59 | 59 | $groups = $this->groupManager->search($search, $limit, $offset); |
| 60 | - $groupIds = array_map(function (IGroup $group) { return $group->getGID(); }, $groups); |
|
| 60 | + $groupIds = array_map(function(IGroup $group) { return $group->getGID(); }, $groups); |
|
| 61 | 61 | |
| 62 | 62 | if (!$this->shareeEnumeration || count($groups) < $limit) { |
| 63 | 63 | $hasMoreResults = true; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $userGroups = []; |
|
| 66 | + $userGroups = []; |
|
| 67 | 67 | if (!empty($groups) && $this->shareWithGroupOnly) { |
| 68 | 68 | // Intersect all the groups that match with the groups this user is a member of |
| 69 | 69 | $userGroups = $this->groupManager->getUserGroups($this->userSession->getUser()); |
| 70 | - $userGroups = array_map(function (IGroup $group) { return $group->getGID(); }, $userGroups); |
|
| 70 | + $userGroups = array_map(function(IGroup $group) { return $group->getGID(); }, $userGroups); |
|
| 71 | 71 | $groupIds = array_intersect($groupIds, $userGroups); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | if (count($configNames) > 1) { |
| 68 | 68 | if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) { |
| 69 | - $output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>'); |
|
| 69 | + $output->writeln('<error>System config '.implode(' => ', $configNames).' could not be deleted because it did not exist</error>'); |
|
| 70 | 70 | return 1; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -76,21 +76,21 @@ discard block |
||
| 76 | 76 | $value = $this->removeSubValue(array_slice($configNames, 1), $value, $input->hasParameterOption('--error-if-not-exists')); |
| 77 | 77 | } |
| 78 | 78 | catch (\UnexpectedValueException $e) { |
| 79 | - $output->writeln('<error>System config ' . implode(' => ', $configNames) . ' could not be deleted because it did not exist</error>'); |
|
| 79 | + $output->writeln('<error>System config '.implode(' => ', $configNames).' could not be deleted because it did not exist</error>'); |
|
| 80 | 80 | return 1; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | $this->systemConfig->setValue($configName, $value); |
| 84 | - $output->writeln('<info>System config value ' . implode(' => ', $configNames) . ' deleted</info>'); |
|
| 84 | + $output->writeln('<info>System config value '.implode(' => ', $configNames).' deleted</info>'); |
|
| 85 | 85 | return 0; |
| 86 | 86 | } else { |
| 87 | 87 | if ($input->hasParameterOption('--error-if-not-exists') && !in_array($configName, $this->systemConfig->getKeys())) { |
| 88 | - $output->writeln('<error>System config ' . $configName . ' could not be deleted because it did not exist</error>'); |
|
| 88 | + $output->writeln('<error>System config '.$configName.' could not be deleted because it did not exist</error>'); |
|
| 89 | 89 | return 1; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | $this->systemConfig->deleteValue($configName); |
| 93 | - $output->writeln('<info>System config value ' . $configName . ' deleted</info>'); |
|
| 93 | + $output->writeln('<info>System config value '.$configName.' deleted</info>'); |
|
| 94 | 94 | return 0; |
| 95 | 95 | } |
| 96 | 96 | } |
@@ -63,10 +63,10 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | $languages = $lang; |
| 65 | 65 | if (empty($lang)) { |
| 66 | - $languages= $this->getAllLanguages($path); |
|
| 66 | + $languages = $this->getAllLanguages($path); |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - foreach($languages as $lang) { |
|
| 69 | + foreach ($languages as $lang) { |
|
| 70 | 70 | $this->writeFiles($app, $path, $lang, $output); |
| 71 | 71 | } |
| 72 | 72 | } |
@@ -74,16 +74,16 @@ discard block |
||
| 74 | 74 | private function getAllLanguages($path) { |
| 75 | 75 | $result = array(); |
| 76 | 76 | foreach (new DirectoryIterator("$path/l10n") as $fileInfo) { |
| 77 | - if($fileInfo->isDot()) { |
|
| 77 | + if ($fileInfo->isDot()) { |
|
| 78 | 78 | continue; |
| 79 | 79 | } |
| 80 | - if($fileInfo->isDir()) { |
|
| 80 | + if ($fileInfo->isDir()) { |
|
| 81 | 81 | continue; |
| 82 | 82 | } |
| 83 | - if($fileInfo->getExtension() !== 'php') { |
|
| 83 | + if ($fileInfo->getExtension() !== 'php') { |
|
| 84 | 84 | continue; |
| 85 | 85 | } |
| 86 | - $result[]= substr($fileInfo->getBasename(), 0, -4); |
|
| 86 | + $result[] = substr($fileInfo->getBasename(), 0, -4); |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $result; |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | $jsTrans = array(); |
| 106 | 106 | foreach ($translations as $id => $val) { |
| 107 | 107 | if (is_array($val)) { |
| 108 | - $val = '[ ' . implode(',', $val) . ']'; |
|
| 108 | + $val = '[ '.implode(',', $val).']'; |
|
| 109 | 109 | } |
| 110 | 110 | $jsTrans[] = "\"$id\" : \"$val\""; |
| 111 | 111 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | ['app' => 'encryption']); |
| 119 | 119 | |
| 120 | 120 | if (openssl_error_string()) { |
| 121 | - $log->error('Encryption library openssl_pkey_new() fails: ' . openssl_error_string(), |
|
| 121 | + $log->error('Encryption library openssl_pkey_new() fails: '.openssl_error_string(), |
|
| 122 | 122 | ['app' => 'encryption']); |
| 123 | 123 | } |
| 124 | 124 | } elseif (openssl_pkey_export($res, |
@@ -133,10 +133,10 @@ discard block |
||
| 133 | 133 | 'privateKey' => $privateKey |
| 134 | 134 | ]; |
| 135 | 135 | } |
| 136 | - $log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.' . $this->user, |
|
| 136 | + $log->error('Encryption library couldn\'t export users private key, please check your servers OpenSSL configuration.'.$this->user, |
|
| 137 | 137 | ['app' => 'encryption']); |
| 138 | 138 | if (openssl_error_string()) { |
| 139 | - $log->error('Encryption Library:' . openssl_error_string(), |
|
| 139 | + $log->error('Encryption Library:'.openssl_error_string(), |
|
| 140 | 140 | ['app' => 'encryption']); |
| 141 | 141 | } |
| 142 | 142 | |
@@ -209,15 +209,15 @@ discard block |
||
| 209 | 209 | public function generateHeader($keyFormat = 'hash') { |
| 210 | 210 | |
| 211 | 211 | if (in_array($keyFormat, $this->supportedKeyFormats, true) === false) { |
| 212 | - throw new \InvalidArgumentException('key format "' . $keyFormat . '" is not supported'); |
|
| 212 | + throw new \InvalidArgumentException('key format "'.$keyFormat.'" is not supported'); |
|
| 213 | 213 | } |
| 214 | 214 | |
| 215 | 215 | $cipher = $this->getCipher(); |
| 216 | 216 | |
| 217 | 217 | $header = self::HEADER_START |
| 218 | - . ':cipher:' . $cipher |
|
| 219 | - . ':keyFormat:' . $keyFormat |
|
| 220 | - . ':' . self::HEADER_END; |
|
| 218 | + . ':cipher:'.$cipher |
|
| 219 | + . ':keyFormat:'.$keyFormat |
|
| 220 | + . ':'.self::HEADER_END; |
|
| 221 | 221 | |
| 222 | 222 | return $header; |
| 223 | 223 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | |
| 240 | 240 | if (!$encryptedContent) { |
| 241 | 241 | $error = 'Encryption (symmetric) of content failed'; |
| 242 | - $this->logger->error($error . openssl_error_string(), |
|
| 242 | + $this->logger->error($error.openssl_error_string(), |
|
| 243 | 243 | ['app' => 'encryption']); |
| 244 | 244 | throw new EncryptionFailedException($error); |
| 245 | 245 | } |
@@ -267,8 +267,8 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | // Workaround for OpenSSL 0.9.8. Fallback to an old cipher that should work. |
| 270 | - if(OPENSSL_VERSION_NUMBER < 0x1000101f) { |
|
| 271 | - if($cipher === 'AES-256-CTR' || $cipher === 'AES-128-CTR') { |
|
| 270 | + if (OPENSSL_VERSION_NUMBER < 0x1000101f) { |
|
| 271 | + if ($cipher === 'AES-256-CTR' || $cipher === 'AES-128-CTR') { |
|
| 272 | 272 | $cipher = self::LEGACY_CIPHER; |
| 273 | 273 | } |
| 274 | 274 | } |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | * @throws \InvalidArgumentException |
| 285 | 285 | */ |
| 286 | 286 | protected function getKeySize($cipher) { |
| 287 | - if(isset($this->supportedCiphersAndKeySize[$cipher])) { |
|
| 287 | + if (isset($this->supportedCiphersAndKeySize[$cipher])) { |
|
| 288 | 288 | return $this->supportedCiphersAndKeySize[$cipher]; |
| 289 | 289 | } |
| 290 | 290 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | * @return string |
| 312 | 312 | */ |
| 313 | 313 | private function concatIV($encryptedContent, $iv) { |
| 314 | - return $encryptedContent . '00iv00' . $iv; |
|
| 314 | + return $encryptedContent.'00iv00'.$iv; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | * @return string |
| 321 | 321 | */ |
| 322 | 322 | private function concatSig($encryptedContent, $signature) { |
| 323 | - return $encryptedContent . '00sig00' . $signature; |
|
| 323 | + return $encryptedContent.'00sig00'.$signature; |
|
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | * @return string |
| 333 | 333 | */ |
| 334 | 334 | private function addPadding($data) { |
| 335 | - return $data . 'xxx'; |
|
| 335 | + return $data.'xxx'; |
|
| 336 | 336 | } |
| 337 | 337 | |
| 338 | 338 | /** |
@@ -346,7 +346,7 @@ discard block |
||
| 346 | 346 | protected function generatePasswordHash($password, $cipher, $uid = '') { |
| 347 | 347 | $instanceId = $this->config->getSystemValue('instanceid'); |
| 348 | 348 | $instanceSecret = $this->config->getSystemValue('secret'); |
| 349 | - $salt = hash('sha256', $uid . $instanceId . $instanceSecret, true); |
|
| 349 | + $salt = hash('sha256', $uid.$instanceId.$instanceSecret, true); |
|
| 350 | 350 | $keySize = $this->getKeySize($cipher); |
| 351 | 351 | |
| 352 | 352 | $hash = hash_pbkdf2( |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | * @return string |
| 493 | 493 | */ |
| 494 | 494 | private function createSignature($data, $passPhrase) { |
| 495 | - $passPhrase = hash('sha512', $passPhrase . 'a', true); |
|
| 495 | + $passPhrase = hash('sha512', $passPhrase.'a', true); |
|
| 496 | 496 | return hash_hmac('sha256', $data, $passPhrase); |
| 497 | 497 | } |
| 498 | 498 | |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | if ($plainContent) { |
| 584 | 584 | return $plainContent; |
| 585 | 585 | } else { |
| 586 | - throw new DecryptionFailedException('Encryption library: Decryption (symmetric) of content failed: ' . openssl_error_string()); |
|
| 586 | + throw new DecryptionFailedException('Encryption library: Decryption (symmetric) of content failed: '.openssl_error_string()); |
|
| 587 | 587 | } |
| 588 | 588 | } |
| 589 | 589 | |
@@ -649,7 +649,7 @@ discard block |
||
| 649 | 649 | if (openssl_open($encKeyFile, $plainContent, $shareKey, $privateKey)) { |
| 650 | 650 | return $plainContent; |
| 651 | 651 | } else { |
| 652 | - throw new MultiKeyDecryptException('multikeydecrypt with share key failed:' . openssl_error_string()); |
|
| 652 | + throw new MultiKeyDecryptException('multikeydecrypt with share key failed:'.openssl_error_string()); |
|
| 653 | 653 | } |
| 654 | 654 | } |
| 655 | 655 | |
@@ -685,7 +685,7 @@ discard block |
||
| 685 | 685 | 'data' => $sealed |
| 686 | 686 | ]; |
| 687 | 687 | } else { |
| 688 | - throw new MultiKeyEncryptException('multikeyencryption failed ' . openssl_error_string()); |
|
| 688 | + throw new MultiKeyEncryptException('multikeyencryption failed '.openssl_error_string()); |
|
| 689 | 689 | } |
| 690 | 690 | } |
| 691 | 691 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | // Get all mount point owners |
| 86 | 86 | $cache = $this->mountCollection->getMountCache(); |
| 87 | - $mounts = $cache->getMountsForFileId((int)$event->getComment()->getObjectId()); |
|
| 87 | + $mounts = $cache->getMountsForFileId((int) $event->getComment()->getObjectId()); |
|
| 88 | 88 | if (empty($mounts)) { |
| 89 | 89 | return; |
| 90 | 90 | } |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | foreach ($mounts as $mount) { |
| 94 | 94 | $owner = $mount->getUser()->getUID(); |
| 95 | 95 | $ownerFolder = $this->rootFolder->getUserFolder($owner); |
| 96 | - $nodes = $ownerFolder->getById((int)$event->getComment()->getObjectId()); |
|
| 96 | + $nodes = $ownerFolder->getById((int) $event->getComment()->getObjectId()); |
|
| 97 | 97 | if (!empty($nodes)) { |
| 98 | 98 | /** @var Node $node */ |
| 99 | 99 | $node = array_shift($nodes); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | foreach ($users as $user => $path) { |
| 122 | 122 | // numerical user ids end up as integers from array keys, but string |
| 123 | 123 | // is required |
| 124 | - $activity->setAffectedUser((string)$user); |
|
| 124 | + $activity->setAffectedUser((string) $user); |
|
| 125 | 125 | |
| 126 | 126 | $activity->setSubject('add_comment_subject', [ |
| 127 | 127 | 'actor' => $actor, |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $tables = $this->getAllNonUTF8BinTables($this->connection); |
| 79 | 79 | foreach ($tables as $table) { |
| 80 | 80 | $output->info("Change row format for $table ..."); |
| 81 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT = DYNAMIC;'); |
|
| 81 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT = DYNAMIC;'); |
|
| 82 | 82 | try { |
| 83 | 83 | $query->execute(); |
| 84 | 84 | } catch (DriverException $e) { |
@@ -92,10 +92,10 @@ discard block |
||
| 92 | 92 | $output->info("Change collation for $table ..."); |
| 93 | 93 | if ($characterSet === 'utf8mb4') { |
| 94 | 94 | // need to set row compression first |
| 95 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` ROW_FORMAT=COMPRESSED;'); |
|
| 95 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` ROW_FORMAT=COMPRESSED;'); |
|
| 96 | 96 | $query->execute(); |
| 97 | 97 | } |
| 98 | - $query = $this->connection->prepare('ALTER TABLE `' . $table . '` CONVERT TO CHARACTER SET ' . $characterSet . ' COLLATE ' . $characterSet . '_bin;'); |
|
| 98 | + $query = $this->connection->prepare('ALTER TABLE `'.$table.'` CONVERT TO CHARACTER SET '.$characterSet.' COLLATE '.$characterSet.'_bin;'); |
|
| 99 | 99 | try { |
| 100 | 100 | $query->execute(); |
| 101 | 101 | } catch (DriverException $e) { |
@@ -121,10 +121,10 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | // fetch tables by columns |
| 123 | 123 | $statement = $connection->executeQuery( |
| 124 | - "SELECT DISTINCT(TABLE_NAME) AS `table`" . |
|
| 125 | - " FROM INFORMATION_SCHEMA . COLUMNS" . |
|
| 126 | - " WHERE TABLE_SCHEMA = ?" . |
|
| 127 | - " AND (COLLATION_NAME <> '" . $characterSet . "_bin' OR CHARACTER_SET_NAME <> '" . $characterSet . "')" . |
|
| 124 | + "SELECT DISTINCT(TABLE_NAME) AS `table`". |
|
| 125 | + " FROM INFORMATION_SCHEMA . COLUMNS". |
|
| 126 | + " WHERE TABLE_SCHEMA = ?". |
|
| 127 | + " AND (COLLATION_NAME <> '".$characterSet."_bin' OR CHARACTER_SET_NAME <> '".$characterSet."')". |
|
| 128 | 128 | " AND TABLE_NAME LIKE '*PREFIX*%'", |
| 129 | 129 | array($dbName) |
| 130 | 130 | ); |
@@ -136,10 +136,10 @@ discard block |
||
| 136 | 136 | |
| 137 | 137 | // fetch tables by collation |
| 138 | 138 | $statement = $connection->executeQuery( |
| 139 | - "SELECT DISTINCT(TABLE_NAME) AS `table`" . |
|
| 140 | - " FROM INFORMATION_SCHEMA . TABLES" . |
|
| 141 | - " WHERE TABLE_SCHEMA = ?" . |
|
| 142 | - " AND TABLE_COLLATION <> '" . $characterSet . "_bin'" . |
|
| 139 | + "SELECT DISTINCT(TABLE_NAME) AS `table`". |
|
| 140 | + " FROM INFORMATION_SCHEMA . TABLES". |
|
| 141 | + " WHERE TABLE_SCHEMA = ?". |
|
| 142 | + " AND TABLE_COLLATION <> '".$characterSet."_bin'". |
|
| 143 | 143 | " AND TABLE_NAME LIKE '*PREFIX*%'", |
| 144 | 144 | [$dbName] |
| 145 | 145 | ); |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | $xml = new \DOMDocument(); |
| 50 | - $xml->load($appPath . '/appinfo/info.xml'); |
|
| 50 | + $xml->load($appPath.'/appinfo/info.xml'); |
|
| 51 | 51 | |
| 52 | - $schema = \OC::$SERVERROOT . '/resources/app-info.xsd'; |
|
| 52 | + $schema = \OC::$SERVERROOT.'/resources/app-info.xsd'; |
|
| 53 | 53 | try { |
| 54 | 54 | if ($this->isShipped($appId)) { |
| 55 | 55 | // Shipped apps are allowed to have the public and default_enabled tags |
| 56 | - $schema = \OC::$SERVERROOT . '/resources/app-info-shipped.xsd'; |
|
| 56 | + $schema = \OC::$SERVERROOT.'/resources/app-info-shipped.xsd'; |
|
| 57 | 57 | } |
| 58 | 58 | } catch (\Exception $e) { |
| 59 | 59 | // Assume it is not shipped |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | protected function loadShippedJson() { |
| 100 | 100 | if ($this->shippedApps === null) { |
| 101 | - $shippedJson = \OC::$SERVERROOT . '/core/shipped.json'; |
|
| 101 | + $shippedJson = \OC::$SERVERROOT.'/core/shipped.json'; |
|
| 102 | 102 | if (!file_exists($shippedJson)) { |
| 103 | 103 | throw new \Exception("File not found: $shippedJson"); |
| 104 | 104 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | use OC\App\CodeChecker\DeprecationCheck; |
| 43 | 43 | use OC\App\CodeChecker\PrivateCheck; |
| 44 | 44 | |
| 45 | -class CheckCode extends Command implements CompletionAwareInterface { |
|
| 45 | +class CheckCode extends Command implements CompletionAwareInterface { |
|
| 46 | 46 | |
| 47 | 47 | protected $checkers = [ |
| 48 | 48 | 'private' => PrivateCheck::class, |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | 'c', |
| 65 | 65 | InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, |
| 66 | 66 | 'enable the specified checker(s)', |
| 67 | - [ 'private', 'deprecation', 'strong-comparison' ] |
|
| 67 | + ['private', 'deprecation', 'strong-comparison'] |
|
| 68 | 68 | ) |
| 69 | 69 | ->addOption( |
| 70 | 70 | '--skip-checkers', |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $codeChecker = new CodeChecker($checkList, !$input->getOption('skip-validate-info')); |
| 96 | 96 | |
| 97 | 97 | $codeChecker->listen('CodeChecker', 'analyseFileBegin', function($params) use ($output) { |
| 98 | - if(OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
| 98 | + if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
| 99 | 99 | $output->writeln("<info>Analysing {$params}</info>"); |
| 100 | 100 | } |
| 101 | 101 | }); |
@@ -103,29 +103,29 @@ discard block |
||
| 103 | 103 | $count = count($errors); |
| 104 | 104 | |
| 105 | 105 | // show filename if the verbosity is low, but there are errors in a file |
| 106 | - if($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { |
|
| 106 | + if ($count > 0 && OutputInterface::VERBOSITY_VERBOSE > $output->getVerbosity()) { |
|
| 107 | 107 | $output->writeln("<info>Analysing {$filename}</info>"); |
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | // show error count if there are errors present or the verbosity is high |
| 111 | - if($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
| 111 | + if ($count > 0 || OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) { |
|
| 112 | 112 | $output->writeln(" {$count} errors"); |
| 113 | 113 | } |
| 114 | 114 | usort($errors, function($a, $b) { |
| 115 | - return $a['line'] >$b['line']; |
|
| 115 | + return $a['line'] > $b['line']; |
|
| 116 | 116 | }); |
| 117 | 117 | |
| 118 | - foreach($errors as $p) { |
|
| 118 | + foreach ($errors as $p) { |
|
| 119 | 119 | $line = sprintf("%' 4d", $p['line']); |
| 120 | 120 | $output->writeln(" <error>line $line: {$p['disallowedToken']} - {$p['reason']}</error>"); |
| 121 | 121 | } |
| 122 | 122 | }); |
| 123 | 123 | $errors = []; |
| 124 | - if(!$input->getOption('skip-checkers')) { |
|
| 124 | + if (!$input->getOption('skip-checkers')) { |
|
| 125 | 125 | $errors = $codeChecker->analyse($appId); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - if(!$input->getOption('skip-validate-info')) { |
|
| 128 | + if (!$input->getOption('skip-validate-info')) { |
|
| 129 | 129 | $infoChecker = new InfoChecker(); |
| 130 | 130 | $infoChecker->listen('InfoChecker', 'parseError', function($error) use ($output) { |
| 131 | 131 | $output->writeln("<error>Invalid appinfo.xml file found: $error</error>"); |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | throw new \RuntimeException("No app with given id <$appId> known."); |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | - $updatePhp = $appPath . '/appinfo/update.php'; |
|
| 181 | + $updatePhp = $appPath.'/appinfo/update.php'; |
|
| 182 | 182 | if (file_exists($updatePhp)) { |
| 183 | 183 | $output->writeln("<info>Deprecated file found: $updatePhp - please use repair steps</info>"); |
| 184 | 184 | } |