Skip to content

Commit

Permalink
PHPStan 2.0 update.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Nov 11, 2024
1 parent 82712db commit 71ed4c6
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 36 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@
"require-dev": {
"robmorgan/phinx": "^0.16.2",
"fig-r/psr2r-sniffer": "dev-master",
"phpstan/phpstan": "^1.0.0",
"phpstan/phpstan": "^2.0.0",
"dereuromark/cakephp-ide-helper": "dev-master as 2.0.0",
"dereuromark/cakephp-ide-helper-extra": "dev-master",
"dereuromark/cakephp-test-helper": "dev-master",
"phpunit/phpunit": "^11.3",
"cakedc/cakephp-phpstan": "^3.1.1"
"cakedc/cakephp-phpstan": "^4.0"
},
"autoload": {
"psr-4": {
Expand Down
47 changes: 24 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ includes:
parameters:
level: 8

checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
checkMissingIterableValueType: false

paths:
- src/
Expand All @@ -22,7 +20,8 @@ parameters:
- %rootDir%/../../../src/Console/Installer.php

ignoreErrors:
- '# with no value type specified in iterable type \w+#'
- identifier: missingType.generics
- identifier: missingType.iterableValue
- '#Constant \w+ not found\.#'
- '#Access to an undefined property .+SandboxCategory::\$.+.#'
- '#Call to an undefined method .+Mailer::set.+#'
Expand Down
4 changes: 0 additions & 4 deletions plugins/Sandbox/src/Dto/Github/LabelDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ public function setName(?string $name) {
/**
* @param string $name
*
* @throws \RuntimeException If value is not present.
*
* @return $this
*/
public function setNameOrFail(string $name) {
Expand Down Expand Up @@ -141,8 +139,6 @@ public function setColor(?string $color) {
/**
* @param string $color
*
* @throws \RuntimeException If value is not present.
*
* @return $this
*/
public function setColorOrFail(string $color) {
Expand Down
4 changes: 0 additions & 4 deletions plugins/Sandbox/src/Dto/Github/PullRequestDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,6 @@ public function setHead(?\Sandbox\Dto\Github\HeadDto $head) {
/**
* @param \Sandbox\Dto\Github\HeadDto $head
*
* @throws \RuntimeException If value is not present.
*
* @return $this
*/
public function setHeadOrFail(\Sandbox\Dto\Github\HeadDto $head) {
Expand Down Expand Up @@ -569,8 +567,6 @@ public function setBase(?\Sandbox\Dto\Github\BaseDto $base) {
/**
* @param \Sandbox\Dto\Github\BaseDto $base
*
* @throws \RuntimeException If value is not present.
*
* @return $this
*/
public function setBaseOrFail(\Sandbox\Dto\Github\BaseDto $base) {
Expand Down

0 comments on commit 71ed4c6

Please sign in to comment.