-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Convert DB facade stub method to static
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Feature: DB facade alias | ||
Want to check that the alias of the DB facade works properly | ||
|
||
Background: | ||
Given I have the following config | ||
""" | ||
<?xml version="1.0"?> | ||
<psalm totallyTyped="false"> | ||
<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; | ||
function test(): void { | ||
\DB::raw(1); | ||
} | ||
""" | ||
When I run Psalm | ||
Then I see no errors |