Skip to content

Commit 06748d1

Browse files
committed
Merge branch 'feature/psr12'
2 parents 6367456 + dd5e886 commit 06748d1

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/eXolnet
77

88
## Pull Requests
99

10-
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer lint`` and fix it with ``$ composer lint-fix``.
10+
- **[PSR-12 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md)** - Check the code style with ``$ composer lint`` and fix it with ``$ composer lint-fix``.
1111

1212
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
1313

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
}
3838
},
3939
"scripts": {
40-
"lint": "vendor/bin/phpcs -p --standard=PSR2 config src tests",
41-
"lint-fix": "vendor/bin/phpcbf -p --standard=PSR2 config src tests",
40+
"lint": "vendor/bin/phpcs -p --standard=PSR12 config src tests",
41+
"lint-fix": "vendor/bin/phpcbf -p --standard=PSR12 config src tests",
4242
"test": "vendor/bin/phpunit",
4343
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
4444
},

src/Console/DbUpgradeCommand.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class DbUpgradeCommand extends Command
2020
/**
2121
* @var string
2222
*/
23-
const UPGRADE_CONTENT_FILENAME = 'content.sql';
23+
protected const UPGRADE_CONTENT_FILENAME = 'content.sql';
2424

2525
/**
2626
* @var string
2727
*/
28-
const UPGRADE_BACKUP_FILENAME = 'backup.sql';
28+
protected const UPGRADE_BACKUP_FILENAME = 'backup.sql';
2929

3030
/**
3131
* The name and signature of the console command.
@@ -309,7 +309,7 @@ protected function importContent(): void
309309
$config = $this->getDatabaseConfig();
310310
$contentFile = $this->getTemporaryUpgradePath(static::UPGRADE_CONTENT_FILENAME);
311311

312-
$command = 'cat "' . $contentFile . '" | "' .$this->commandMysql .
312+
$command = 'cat "' . $contentFile . '" | "' . $this->commandMysql .
313313
'" -h "' . $config['host'] .
314314
'" -u "' . $config['username'] . '" ' .
315315
($config['password'] ? '-p"' . $config['password'] . '"' : '') .
@@ -358,7 +358,7 @@ protected function checkExistingDatabase(): void
358358

359359
foreach ($this->getExpectedTables() as $table) {
360360
if (! Schema::hasTable($table)) {
361-
throw new PreConditionNotMetException('Could not find required table "'. $table .'".');
361+
throw new PreConditionNotMetException('Could not find required table "' . $table . '".');
362362
}
363363
}
364364
}
@@ -373,7 +373,7 @@ protected function getTemporaryUpgradePath($path = null): string
373373
$this->temporaryPathPrefix = now()->toDateTimeString();
374374
}
375375

376-
return storage_path(rtrim('upgrade-'. $this->temporaryPathPrefix .'/' . $path, '/'));
376+
return storage_path(rtrim('upgrade-' . $this->temporaryPathPrefix . '/' . $path, '/'));
377377
}
378378

379379
/**

src/DbUpgradeServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function boot()
1616
}
1717

1818
$this->publishes([
19-
__DIR__.'/../config/db-upgrade.php' => config_path('db-upgrade.php'),
19+
__DIR__ . '/../config/db-upgrade.php' => config_path('db-upgrade.php'),
2020
], 'config');
2121
}
2222

0 commit comments

Comments
 (0)