@@ -31,20 +31,20 @@ |
||
| 31 | 31 | |
| 32 | 32 | require '../3rdparty/autoload.php'; |
| 33 | 33 | |
| 34 | -$locales = array_map(static function (string $localeCode) { |
|
| 34 | +$locales = array_map(static function(string $localeCode) { |
|
| 35 | 35 | return [ |
| 36 | 36 | 'code' => $localeCode, |
| 37 | 37 | 'name' => Locale::getDisplayName($localeCode, 'en') |
| 38 | 38 | ]; |
| 39 | 39 | }, ResourceBundle::getLocales('')); |
| 40 | 40 | |
| 41 | -$locales = array_filter($locales, static function (array $locale) { |
|
| 41 | +$locales = array_filter($locales, static function(array $locale) { |
|
| 42 | 42 | return is_array(Punic\Data::explodeLocale($locale['code'])); |
| 43 | 43 | }); |
| 44 | 44 | |
| 45 | 45 | $locales = array_values($locales); |
| 46 | 46 | |
| 47 | -if (file_put_contents(__DIR__ . '/locales.json', json_encode($locales, JSON_PRETTY_PRINT)) === false) { |
|
| 47 | +if (file_put_contents(__DIR__.'/locales.json', json_encode($locales, JSON_PRETTY_PRINT)) === false) { |
|
| 48 | 48 | echo 'Failed to update locales.json'; |
| 49 | 49 | exit(1); |
| 50 | 50 | } |
@@ -62,10 +62,10 @@ |
||
| 62 | 62 | if (is_array($value)) { |
| 63 | 63 | $output->writeln(" <comment>>></comment> $key:"); |
| 64 | 64 | foreach ($value as $subKey => $subValue) { |
| 65 | - $output->writeln(" <comment>>></comment> $subKey: " . str_repeat(' ', 46 - strlen($subKey)) . $subValue); |
|
| 65 | + $output->writeln(" <comment>>></comment> $subKey: ".str_repeat(' ', 46 - strlen($subKey)).$subValue); |
|
| 66 | 66 | } |
| 67 | 67 | } else { |
| 68 | - $output->writeln(" <comment>>></comment> $key: " . str_repeat(' ', 50 - strlen($key)) . $value); |
|
| 68 | + $output->writeln(" <comment>>></comment> $key: ".str_repeat(' ', 50 - strlen($key)).$value); |
|
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | return 0; |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | protected function execute(InputInterface $input, OutputInterface $output): int { |
| 54 | 54 | $outputType = $input->getOption('output'); |
| 55 | 55 | if ($outputType === self::OUTPUT_FORMAT_JSON || $outputType === self::OUTPUT_FORMAT_JSON_PRETTY) { |
| 56 | - $certificates = array_map(function (ICertificate $certificate) { |
|
| 56 | + $certificates = array_map(function(ICertificate $certificate) { |
|
| 57 | 57 | return [ |
| 58 | 58 | 'name' => $certificate->getName(), |
| 59 | 59 | 'common_name' => $certificate->getCommonName(), |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | 'Issued By' |
| 80 | 80 | ]); |
| 81 | 81 | |
| 82 | - $rows = array_map(function (ICertificate $certificate) { |
|
| 82 | + $rows = array_map(function(ICertificate $certificate) { |
|
| 83 | 83 | return [ |
| 84 | 84 | $certificate->getName(), |
| 85 | 85 | $certificate->getCommonName(), |
@@ -76,11 +76,11 @@ |
||
| 76 | 76 | $moduleId = $input->getArgument('module'); |
| 77 | 77 | |
| 78 | 78 | if ($moduleId === $this->encryptionManager->getDefaultEncryptionModuleId()) { |
| 79 | - $output->writeln('"' . $moduleId . '"" is already the default module'); |
|
| 79 | + $output->writeln('"'.$moduleId.'"" is already the default module'); |
|
| 80 | 80 | } elseif ($this->encryptionManager->setDefaultEncryptionModule($moduleId)) { |
| 81 | - $output->writeln('<info>Set default module to "' . $moduleId . '"</info>'); |
|
| 81 | + $output->writeln('<info>Set default module to "'.$moduleId.'"</info>'); |
|
| 82 | 82 | } else { |
| 83 | - $output->writeln('<error>The specified module "' . $moduleId . '" does not exist</error>'); |
|
| 83 | + $output->writeln('<error>The specified module "'.$moduleId.'" does not exist</error>'); |
|
| 84 | 84 | return 1; |
| 85 | 85 | } |
| 86 | 86 | return 0; |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $column->setType(Type::getType(Types::BIGINT)); |
| 94 | 94 | $column->setOptions(['length' => 20]); |
| 95 | 95 | |
| 96 | - $updates[] = '* ' . $tableName . '.' . $columnName; |
|
| 96 | + $updates[] = '* '.$tableName.'.'.$columnName; |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | } |
@@ -46,8 +46,8 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $types = ['resources', 'rooms']; |
| 48 | 48 | foreach ($types as $type) { |
| 49 | - if (!$schema->hasTable('calendar_' . $type)) { |
|
| 50 | - $table = $schema->createTable('calendar_' . $type); |
|
| 49 | + if (!$schema->hasTable('calendar_'.$type)) { |
|
| 50 | + $table = $schema->createTable('calendar_'.$type); |
|
| 51 | 51 | |
| 52 | 52 | $table->addColumn('id', Types::BIGINT, [ |
| 53 | 53 | 'autoincrement' => true, |
@@ -77,9 +77,9 @@ discard block |
||
| 77 | 77 | ]); |
| 78 | 78 | |
| 79 | 79 | $table->setPrimaryKey(['id']); |
| 80 | - $table->addIndex(['backend_id', 'resource_id'], 'calendar_' . $type . '_bkdrsc'); |
|
| 81 | - $table->addIndex(['email'], 'calendar_' . $type . '_email'); |
|
| 82 | - $table->addIndex(['displayname'], 'calendar_' . $type . '_name'); |
|
| 80 | + $table->addIndex(['backend_id', 'resource_id'], 'calendar_'.$type.'_bkdrsc'); |
|
| 81 | + $table->addIndex(['email'], 'calendar_'.$type.'_email'); |
|
| 82 | + $table->addIndex(['displayname'], 'calendar_'.$type.'_name'); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | 'length' => 11, |
| 60 | 60 | 'unsigned' => true, |
| 61 | 61 | ]); |
| 62 | - $table->addColumn($type . '_id', Types::BIGINT, [ |
|
| 62 | + $table->addColumn($type.'_id', Types::BIGINT, [ |
|
| 63 | 63 | 'notnull' => true, |
| 64 | 64 | 'length' => 11, |
| 65 | 65 | 'unsigned' => true, |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ]); |
| 75 | 75 | |
| 76 | 76 | $table->setPrimaryKey(['id']); |
| 77 | - $table->addIndex([$type . '_id', 'key'], $this->getMetadataTableName($type) . '_idk'); |
|
| 77 | + $table->addIndex([$type.'_id', 'key'], $this->getMetadataTableName($type).'_idk'); |
|
| 78 | 78 | } |
| 79 | 79 | } |
| 80 | 80 | |
@@ -86,6 +86,6 @@ discard block |
||
| 86 | 86 | * @return string |
| 87 | 87 | */ |
| 88 | 88 | private function getMetadataTableName(string $type):string { |
| 89 | - return 'calendar_' . $type . 's_md'; |
|
| 89 | + return 'calendar_'.$type.'s_md'; |
|
| 90 | 90 | } |
| 91 | 91 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function injectFn(callable $fn) { |
| 45 | 45 | $reflected = new ReflectionFunction(Closure::fromCallable($fn)); |
| 46 | - return $fn(...array_map(function (ReflectionParameter $param) { |
|
| 46 | + return $fn(...array_map(function(ReflectionParameter $param) { |
|
| 47 | 47 | // First we try by type (more likely these days) |
| 48 | 48 | if (($type = $param->getType()) !== null) { |
| 49 | 49 | try { |
@@ -60,11 +60,11 @@ |
||
| 60 | 60 | if ($readablePath) { |
| 61 | 61 | $message = "\"$path\"(\"$readablePath\") is locked"; |
| 62 | 62 | } else { |
| 63 | - $message = '"' . $path . '" is locked'; |
|
| 63 | + $message = '"'.$path.'" is locked'; |
|
| 64 | 64 | } |
| 65 | 65 | $this->existingLock = $existingLock; |
| 66 | 66 | if ($existingLock) { |
| 67 | - $message .= ', existing lock on file: ' . $existingLock; |
|
| 67 | + $message .= ', existing lock on file: '.$existingLock; |
|
| 68 | 68 | } |
| 69 | 69 | parent::__construct($message, 0, $previous); |
| 70 | 70 | $this->path = $path; |