Skip to content

Commit b97d951

Browse files
committed
Adding PHPStan
1 parent ae373f0 commit b97d951

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Tool/Generator.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function generateDefinition(string $namespacedClass, array $properties) :
8383
$parts = explode('\\', $namespacedClass);
8484
$class = array_pop($parts);
8585
$namespace = implode('\\', $parts);
86+
$originalType = '';
8687

8788
if (! isset($properties['type']))
8889
{

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"require": {
1515
"php": ">=8.0 <8.2",
1616
"guzzlehttp/guzzle": "^7.3",
17-
"spatie/guzzle-rate-limiter-middleware": "^2.0"
17+
"spatie/guzzle-rate-limiter-middleware": "^2.0",
18+
"phpstan/phpstan": "^1.8"
1819
},
1920
"require-dev": {
2021
"phpunit/phpunit": ">=9.0",

phpstan.neon.dist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
parameters:
2+
level: 4
3+
errorFormat: raw
4+
editorUrl: '%%file%% %%line%% %%column%%: %%error%%'
5+
paths:
6+
- src
7+
- Tests
8+
- Tool
9+
ignoreErrors:
10+
-
11+
message: '#Access to an undefined property Tests\\Fixtures[a-zA-Z0-9\\_]+::[\$a-zA-Z0-9_]+#'
12+
paths:
13+
- Tests/*
14+

0 commit comments

Comments
 (0)