Skip to content

Commit

Permalink
add realpath to NativeFunctionDynamicFunctionReturnTypeExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Sep 17, 2023
1 parent 6cba521 commit b2b82e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ src/Command/ReleaseCommand.php:51
------------------------------------------------------------------------------------------
```

The config also loads few return type extensions.
<br>

### Return Type Extensions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class NativeFunctionDynamicFunctionReturnTypeExtension implements DynamicF
{
public function isFunctionSupported(FunctionReflection $functionReflection): bool
{
return in_array($functionReflection->getName(), ['getcwd', 'dirname'], true);
return in_array($functionReflection->getName(), ['getcwd', 'dirname', 'realpath'], true);

This comment has been minimized.

Copy link
@samsonasik

samsonasik Sep 17, 2023

Member

@TomasVotruba it seems cause invalid result:

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  packages/Caching/Detector/ChangedFilesDetector.php:90
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  - '#Strict comparison using \=\=\= between string and false will always evaluate to false#'
 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

This comment has been minimized.

Copy link
@TomasVotruba

TomasVotruba Sep 18, 2023

Author Member

That error should be skipped. I've added it because other projects return string in 99 % of cases and it reported dozens f errors.

This comment has been minimized.

Copy link
@samsonasik

samsonasik Sep 18, 2023

Member

ok, I will skipped it.

}

public function getTypeFromFunctionCall(
Expand Down

0 comments on commit b2b82e1

Please sign in to comment.