Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Apr 30, 2021
1 parent 47f25c9 commit 00f775b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/ExtensionSorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@ private static function sortCandidatesByConditions(array $candidates): array
$registered = [];
$castlingTtl = [];
while ($candidates !== []) {
if (($candidateKey = array_keys($candidates)[0] ?? null) === null) {
$candidateKey = array_keys($candidates)[0] ?? null;
if ($candidateKey === null) {
break;
}
if (($candidate = $candidates[$candidateKey] ?? null) === null) {
$candidate = $candidates[$candidateKey] ?? null;
if ($candidate === null) {
throw new \RuntimeException('Candidate key "' . $candidateKey . '" is broken.');
}

Expand Down
2 changes: 1 addition & 1 deletion src/InteractiveComposer/Task/ConfigLocalNeonTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private function generateMySqlConfig(): array
while (true) {
if ($usedDatabase === null) {
$usedDatabase = (string) $this->ask('Which database use? Type number or specific name. Type "new" for create new.');
if (preg_match('/^\d+$/',$usedDatabase)) {
if (preg_match('/^\d+$/', $usedDatabase)) {
$usedDatabaseKey = (int) $usedDatabase;
if (isset($databaseList[$usedDatabaseKey])) {
$usedDatabase = $databaseList[$usedDatabaseKey];
Expand Down

0 comments on commit 00f775b

Please sign in to comment.