Skip to content

Commit

Permalink
Switch to ignoring errors instead of stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 committed Jan 2, 2025
1 parent 8081d2a commit c0c09d0
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 60 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ indent_size = 2

[*.php]
ij_php_align_multiline_parameters = false

[*.neon]
indent_style = tab
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/.gitignore export-ignore
/phpstan*.neon export-ignore
/phpunit.xml.dist export-ignore
/stubs export-ignore
/tests export-ignore
/README.md export-ignore
/resources/get-syn.php export-ignore
Expand Down
53 changes: 40 additions & 13 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,14 +1,41 @@
parameters:
level: 10
paths:
- src
- tests
treatPhpDocTypesAsCertain: false
stubFiles:
- stubs/DesiredCapabilities.stub
- stubs/RemoteWebDriver.stub
- stubs/WebDriverTimeouts.stub

includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/rules.neon

parameters:
level: 10
paths:
- src
- tests
treatPhpDocTypesAsCertain: false
ignoreErrors:
-
message: '#^Method Mink\\WebdriverClassicDriver\\WebdriverClassicDriver\:\:getDesiredCapabilities\(\) should return array\<string, mixed\> but returns array\.$#'
identifier: return.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Method Mink\\WebdriverClassicDriver\\WebdriverClassicDriver\:\:getWindowHandleFromName\(\) should return string but returns mixed\.$#'
identifier: return.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Parameter \#1 \$handle of method Facebook\\WebDriver\\Remote\\RemoteTargetLocator\:\:window\(\) expects string, mixed given\.$#'
identifier: argument.type
count: 3
path: src/WebdriverClassicDriver.php
-
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:implicitlyWait\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:pageLoadTimeout\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
-
message: '#^Parameter \#1 \$seconds of method Facebook\\WebDriver\\WebDriverTimeouts\:\:setScriptTimeout\(\) expects int, float\|int given\.$#'
identifier: argument.type
count: 1
path: src/WebdriverClassicDriver.php
11 changes: 0 additions & 11 deletions stubs/DesiredCapabilities.stub

This file was deleted.

11 changes: 0 additions & 11 deletions stubs/RemoteWebDriver.stub

This file was deleted.

24 changes: 0 additions & 24 deletions stubs/WebDriverTimeouts.stub

This file was deleted.

0 comments on commit c0c09d0

Please sign in to comment.