Patrick Kusebauch
Patrick Kusebauch
Looking at the failing checks, none of them seem to be genuinely caused by this change.
> Please add a pattern-matching example-test and use it in rule-tests which emit errors before this PR and are expected to be fixed now Updated the PR. Error emitted before...
Updated to also specify the type in condition branches. This closes https://github.com/phpstan/phpstan/issues/10585 for me. I have a question about `TypeTraverser::map` and `TypeCombinator::union`. I tried to replicate the code in `GettypeFunctionReturnTypeExtension`...
Maybe this is a bug in `is_int`, because it works for `gettype` : https://phpstan.org/r/f680c77d-432b-4641-856b-a2d3ee518f71 If I can get some direction on where to look in the source code, I would...
Given a function/method that returns a union type: ```php public function stockPriceInCZK(string $tickerName): float|DomainTemporarilyUnavailable { return match ($tickerName) { 'IUSA.L' => $this->alphaVantageStockPriceInCZK($tickerName), default => $this->polygonStockPriceInCZK($tickerName), }; } ``` I want...
Agreed. This is what I hacked together in the meantime as a start: ```php public function getTypeFromFunctionCall( FunctionReflection $functionReflection, FuncCall $functionCall, Scope $scope ): ?\PHPStan\Type\Type { $argType = $scope->getType($functionCall->getArgs()[0]->value); if...
@ilnytskyi can you explain how the current ConfigBuilder is not sufficient? You can define layers dynamically in PHP now: https://github.com/qossmic/deptrac/blob/a39d889997a16e301b5cd2fed1f29ef778c0087e/deptrac.config.php#L29. Can you outline your use case where this is not...
Implemented in https://github.com/qossmic/deptrac/pull/1002.
Yeah, we are lagging behind on the docs. It is a very recent addition.
Closing as "Won't do"