mirror of
https://github.com/pestphp/pest.git
synced 2026-03-10 01:37:21 +01:00
chore: phpstan level 5
This commit is contained in:
@ -6,7 +6,6 @@ namespace Pest\Support;
|
||||
|
||||
use Closure;
|
||||
use Pest\Exceptions\ShouldNotHappen;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@ -19,7 +18,7 @@ final class ChainableClosure
|
||||
public static function from(Closure $closure, Closure $next): Closure
|
||||
{
|
||||
return function () use ($closure, $next): void {
|
||||
if (! is_object($this)) { // @phpstan-ignore-line
|
||||
if (!is_object($this)) { // @phpstan-ignore-line
|
||||
throw ShouldNotHappen::fromMessage('$this not bound to chainable closure.');
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ use Throwable;
|
||||
*/
|
||||
final class HigherOrderTapProxy
|
||||
{
|
||||
private const UNDEFINED_PROPERTY = 'Undefined property: P\\';
|
||||
private const UNDEFINED_PROPERTY = 'Undefined property: P\\'; // @phpstan-ignore-line
|
||||
|
||||
/**
|
||||
* Create a new tap proxy instance.
|
||||
@ -42,9 +42,8 @@ final class HigherOrderTapProxy
|
||||
public function __get(string $property)
|
||||
{
|
||||
try {
|
||||
/** @throws Throwable */
|
||||
return $this->target->{$property}; // @phpstan-ignore-line
|
||||
} catch (Throwable $throwable) {
|
||||
} catch (Throwable $throwable) { // @phpstan-ignore-line
|
||||
Reflection::setPropertyValue($throwable, 'file', Backtrace::file());
|
||||
Reflection::setPropertyValue($throwable, 'line', Backtrace::line());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user