2021-07-04 19:18:39 +02:00
|
|
|
Feature: DB facade alias
|
2021-07-06 16:28:37 +02:00
|
|
|
The DB facade is supported
|
2021-07-04 19:18:39 +02:00
|
|
|
|
|
|
|
Background:
|
|
|
|
Given I have the following config
|
|
|
|
"""
|
|
|
|
<?xml version="1.0"?>
|
2022-02-21 10:15:13 +01:00
|
|
|
<psalm errorLevel="2" reportMixedIssues="false">
|
2021-07-04 19:18:39 +02:00
|
|
|
<projectFiles>
|
|
|
|
<directory name="."/>
|
|
|
|
<ignoreFiles> <directory name="../../vendor"/> </ignoreFiles>
|
|
|
|
</projectFiles>
|
|
|
|
<plugins>
|
|
|
|
<pluginClass class="Psalm\LaravelPlugin\Plugin"/>
|
|
|
|
</plugins>
|
|
|
|
</psalm>
|
|
|
|
"""
|
|
|
|
|
|
|
|
Scenario: call the DB facade alias
|
|
|
|
Given I have the following code
|
|
|
|
"""
|
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Tests\Psalm\LaravelPlugin\Sandbox;
|
|
|
|
|
2021-07-29 21:14:05 +02:00
|
|
|
function test(): \Illuminate\Database\Query\Expression {
|
|
|
|
return \DB::raw(1);
|
2021-07-04 19:18:39 +02:00
|
|
|
}
|
|
|
|
"""
|
|
|
|
When I run Psalm
|
|
|
|
Then I see no errors
|