Skip to content

Commit

Permalink
Fix compatibility for PHP 7.2 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 8, 2022
1 parent 8f1d94f commit b7efb38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
// For PHP 7.2 compat
'heredoc_indentation' => false,
'trailing_comma_in_multiline' => false,
'use_arrow_functions' => false,

'mb_str_functions' => false,
'no_trailing_whitespace_in_string' => false,
Expand Down
4 changes: 3 additions & 1 deletion src/Diagnoser.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ final class Diagnoser
public static function diagnose(array $finders): string
{
$diagnoses = array_map(
static fn (CpuCoreFinder $finder): string => self::diagnoseFinder($finder),
static function (CpuCoreFinder $finder): string {
return self::diagnoseFinder($finder);
},
$finders
);

Expand Down
2 changes: 1 addition & 1 deletion src/Finder/PopenBasedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function diagnose(): string
if (!is_resource($process)) {
return sprintf(
'Could not execute the function "popen" with the command "%s".',
$command,
$command
);
}

Expand Down

0 comments on commit b7efb38

Please sign in to comment.