mirror of
https://github.com/danog/psalm-plugin-laravel.git
synced 2024-12-02 09:37:47 +01:00
f6193ad5cb
totallyTyped was deprecated in Psalm v4.21.0 [1]. totallyTyped="true" is equivalent to errorLevel="1" and totallyTyped="false" is equivalent to errorLevel="2" plus reportMixedIssues="false" [2]. [1] https://github.com/vimeo/psalm/releases/tag/4.21.0 [2] https://psalm.dev/docs/running_psalm/configuration/#totallytyped
37 lines
904 B
Gherkin
37 lines
904 B
Gherkin
Feature: Request types
|
|
\Illuminate\Http\Request has type support
|
|
|
|
Background:
|
|
Given I have the following config
|
|
"""
|
|
<?xml version="1.0"?>
|
|
<psalm errorLevel="2" reportMixedIssues="false">
|
|
<projectFiles>
|
|
<directory name="."/>
|
|
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
|
|
</projectFiles>
|
|
<plugins>
|
|
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
|
|
</plugins>
|
|
</psalm>
|
|
"""
|
|
And I have the following code preamble
|
|
"""
|
|
<?php declare(strict_types=1);
|
|
|
|
namespace Tests\Psalm\LaravelPlugin\Sandbox;
|
|
|
|
use \Illuminate\Http\Request;
|
|
"""
|
|
|
|
Scenario: input returns various types
|
|
Given I have the following code
|
|
"""
|
|
function test(Request $request): bool
|
|
{
|
|
return $request->input('foo', false);
|
|
}
|
|
"""
|
|
When I run psalm
|
|
Then I see no errors
|