Skip to content

Commit 52ae30a

Browse files
d4mationclaude
andcommitted
ENG-222: Fix PHPStan error for file_get_contents return type
Cast file_get_contents() return to string to satisfy PHPStan level 8, since it returns string|false. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 24146a5 commit 52ae30a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Commands/Info.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function execute( InputInterface $input, OutputInterface $output ) {
5454
$suffix = 'does not exist';
5555
$array_to_populate = 'files_absent';
5656

57-
if ( $exists && $file === '.puprc' && ! json_decode( file_get_contents( $file ) ) ) {
57+
if ( $exists && $file === '.puprc' && ! json_decode( (string) file_get_contents( $file ) ) ) {
5858
$prefix = '';
5959
$suffix = '<fg=green>exists</> but could not be parsed: ' . json_last_error_msg();
6060
$array_to_populate = 'files_error';

0 commit comments

Comments
 (0)