Skip to content

Commit bc5b3d4

Browse files
committed
CS: static closures should be static
1 parent 379692d commit bc5b3d4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

autoload.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public static function determineLoadedClass($classesBeforeLoad, $classesAfterLoa
210210
// That way, at the end, only the "main" class just included will remain.
211211
$newClasses = array_reduce(
212212
$newClasses,
213-
function ($remaining, $current) {
213+
static function ($remaining, $current) {
214214
return array_diff($remaining, class_parents($current));
215215
},
216216
$newClasses

src/Reports/Summary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function generate(
9898

9999
uksort(
100100
$reportFiles,
101-
function ($keyA, $keyB) {
101+
static function ($keyA, $keyB) {
102102
$pathPartsA = explode(DIRECTORY_SEPARATOR, $keyA);
103103
$pathPartsB = explode(DIRECTORY_SEPARATOR, $keyB);
104104

src/Util/Cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public static function load(Ruleset $ruleset, Config $config)
105105
);
106106
$filter = new RecursiveCallbackFilterIterator(
107107
$di,
108-
function ($file, $key, $iterator) {
108+
static function ($file, $key, $iterator) {
109109
// Skip non-php files.
110110
$filename = $file->getFilename();
111111
if ($file->isFile() === true && substr($filename, -4) !== '.php') {

src/Util/MessageCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private function arrayColumn(array $input, $columnKey)
298298
}
299299

300300
// PHP 5.4.
301-
$callback = function ($row) use ($columnKey) {
301+
$callback = static function ($row) use ($columnKey) {
302302
return $row[$columnKey];
303303
};
304304

0 commit comments

Comments
 (0)