Skip to content

Commit f2294a2

Browse files
authored
Merge pull request #156 from nswdpc/feat-add-scripts
(dev) add dev helper scripts
2 parents 1a8fd0c + 3a81471 commit f2294a2

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

composer.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,11 @@
7777
"silverstripe/vendor-plugin": true,
7878
"phpstan/extension-installer": true
7979
}
80+
},
81+
"scripts": {
82+
"phpstan-analyse": "./vendor/bin/phpstan analyse --ansi --no-progress --no-interaction --configuration vendor/nswdpc/ci-files/phpstan/.phpstan.silverstripe.neon src/",
83+
"rector-dryrun": "./vendor/bin/rector process --dry-run --ansi --config vendor/nswdpc/ci-files/rector/.rector.silverstripe_53_83.php src/",
84+
"rector-process": "./vendor/bin/rector process --no-diffs --ansi --config vendor/nswdpc/ci-files/rector/.rector.silverstripe_53_83.php src/",
85+
"phpcsfixer-fix": "./vendor/bin/php-cs-fixer fix --ansi --no-interaction --config vendor/nswdpc/ci-files/php-cs-fixer/.php-cs-fixer.php src/"
8086
}
8187
}

src/Forms/SectionSelectionField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function getSource()
3333
$options = $this->getColourSelectionOptions('section');
3434
$source = [];
3535
foreach ($options as $k => $v) {
36-
$source[ $k ] = _t('nswds.BACKGROUND_' . strtoupper($k), $v);
36+
$source[ $k ] = _t('nswds.BACKGROUND_' . strtoupper((string) $k), $v);
3737
}
3838

3939
$this->source = $source;

0 commit comments

Comments
 (0)