Skip to content

Commit 78da079

Browse files
kelunikSpacePossum
authored andcommitted
Fix non-static closure unbinding this on PHP 7.4
Fixes 'Unbinding $this of closure is deprecated in .../friendsofphp/php-cs-fixer/src/FixerConfiguration/FixerOption.php:174'
1 parent 1835d08 commit 78da079

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Fixer/ControlStructure/NoBreakCommentFixer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ protected function createConfigurationDefinition()
7474
(new FixerOptionBuilder('comment_text', 'The text to use in the added comment and to detect it.'))
7575
->setAllowedTypes(['string'])
7676
->setAllowedValues([
77-
function ($value) {
77+
static function ($value) {
7878
if (\is_string($value) && Preg::match('/\R/', $value)) {
7979
throw new InvalidOptionsException('The comment text must not contain new lines.');
8080
}
8181

8282
return true;
8383
},
8484
])
85-
->setNormalizer(function (Options $options, $value) {
85+
->setNormalizer(static function (Options $options, $value) {
8686
return rtrim($value);
8787
})
8888
->setDefault('no break')

0 commit comments

Comments
 (0)