-
Notifications
You must be signed in to change notification settings - Fork 31
Add PHPStan static analysis at level 5 #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 3.x
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| .PHONY: lint lint-ecs lint-phpstan test | ||
|
|
||
| lint: lint-ecs lint-phpstan | ||
|
|
||
| lint-ecs: | ||
| ./vendor/bin/ecs check | ||
|
|
||
| lint-phpstan: | ||
| ./vendor/bin/phpstan analyse | ||
|
|
||
| test: | ||
| ./vendor/bin/phpunit |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| parameters: | ||
| ignoreErrors: | ||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:get\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Activity.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:patch\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Organization/Address.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:get\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 2 | ||
| path: src/Model/Organization/Organization.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:patch\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Organization/Organization.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:patch\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Organization/Profile.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:get\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Ref/Resolver.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:get\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/SetupOptions.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:patch\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/Team/Team.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:patch\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/Model/UserAccess/ProjectUserAccess.php | ||
|
|
||
| - | ||
| message: '#^Call to an undefined method GuzzleHttp\\ClientInterface\:\:post\(\)\.$#' | ||
| identifier: method.notFound | ||
| count: 1 | ||
| path: src/PlatformClient.php | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| includes: | ||
| - phpstan-baseline.neon | ||
|
|
||
| parameters: | ||
| level: 5 | ||
| paths: | ||
| - src | ||
| - tests | ||
| ignoreErrors: | ||
| # Deliberate pattern: resource classes use new static() for polymorphism. | ||
| - | ||
| identifier: new.static |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -53,6 +53,16 @@ public function getClient(): ClientInterface; | |
| */ | ||
| public function setApiToken(string $token, string $type); | ||
|
|
||
| /** | ||
| * Get the connector configuration. | ||
| */ | ||
| public function getConfig(): array; | ||
|
|
||
| /** | ||
| * Returns the access token saved in the session, if any. | ||
| */ | ||
| public function getAccessToken(): ?string; | ||
|
|
||
|
Comment on lines
+56
to
+65
|
||
| /** | ||
| * Get the configured API gateway URL (without trailing slash). | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,12 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Platformsh\Client\Model; | ||
|
|
||
| /** | ||
| * Represents environment autoscaling settings. | ||
| * | ||
| */ | ||
| class AutoscalingSettings extends ApiResourceBase {} | ||
| class AutoscalingSettings extends ApiResourceBase | ||
| { | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,14 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
|
|
||
| namespace Platformsh\Client\Model; | ||
|
|
||
| /** | ||
| * Represents environment settings. | ||
| * | ||
| * @property-read bool $enable_manual_deployments | ||
| */ | ||
| class Settings extends ApiResourceBase {} | ||
| class Settings extends ApiResourceBase | ||
| { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phpstan-baseline.neon uses tab indentation, but .editorconfig sets indent_style=space for all files. To keep formatting consistent (and avoid future whitespace churn), consider regenerating or reformatting the baseline using spaces.