Skip to content

Commit

Permalink
Fix errors reported by phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Dec 16, 2022
1 parent 9f07c06 commit ec53e0a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
php-version: '7.4'
extensions: mbstring, intl
coverage: none
tools: vimeo/psalm:4.22, phpstan:1.4
tools: vimeo/psalm:4, phpstan:1.9

- name: Composer Install
run: composer require --dev cakephp/cakephp-codesniffer:^4.1
Expand Down
34 changes: 2 additions & 32 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
parameters:
ignoreErrors:
-
message: "#^Access to an undefined property object\\:\\:\\$element\\.$#"
count: 1
path: src/Listener/ViewListener.php

-
message: "#^Access to an undefined property object\\:\\:\\$query\\.$#"
count: 4
path: src/Listener/ViewListener.php

-
message: "#^Access to an undefined property object\\:\\:\\$type\\.$#"
count: 1
path: src/Listener/ViewListener.php

-
message: "#^Cannot unset offset mixed on array\\.$#"
message: "#^Cannot unset offset mixed on array\\{\\}\\.$#"
count: 2
path: src/Listener/ViewListener.php

Expand All @@ -41,22 +26,7 @@ parameters:
path: src/Listener/ViewSearchListener.php

-
message: "#^Binary operation \"\\+\" between string and array\\{data\\-enable\\-seconds\\?\\: 'true', data\\-date\\-format\\: string, data\\-alt\\-format\\?\\: mixed, data\\-alt\\-input\\?\\: 'true', data\\-no\\-calendar\\?\\: 'true', data\\-enable\\-time\\?\\: 'true', data\\-alt\\-input\\-class\\?\\: string, class\\: array\\{'input\\-group', 'flatpickr'\\}\\} results in an error\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

-
message: "#^Binary operation \"\\+\\=\" between array\\<string\\>\\|string and array\\{data\\-enable\\-seconds\\?\\: 'true', data\\-date\\-format\\: string, data\\-alt\\-format\\?\\: mixed, data\\-alt\\-input\\?\\: 'true', data\\-no\\-calendar\\?\\: 'true', data\\-enable\\-time\\?\\: 'true'\\} results in an error\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

-
message: "#^Offset 'data\\-wrap' does not exist on array\\{data\\-enable\\-seconds\\?\\: 'true', data\\-date\\-format\\: string, data\\-alt\\-format\\?\\: mixed, data\\-alt\\-input\\?\\: 'true', data\\-no\\-calendar\\?\\: 'true', data\\-enable\\-time\\?\\: 'true'\\}\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

-
message: "#^Offset 'iconClass' on array\\{data\\-enable\\-seconds\\?\\: 'true', data\\-date\\-format\\: string, data\\-alt\\-format\\?\\: mixed, data\\-alt\\-input\\?\\: 'true', data\\-no\\-calendar\\?\\: 'true', data\\-enable\\-time\\?\\: 'true'\\} in isset\\(\\) does not exist\\.$#"
message: "#^Binary operation \"\\+\" between string and non\\-empty\\-array results in an error\\.$#"
count: 1
path: src/View/Widget/DateTimeWidget.php

Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ includes:
parameters:
level: 7
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
paths:
- src
universalObjectCratesClasses:
Expand Down
2 changes: 1 addition & 1 deletion src/Action/DashboardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DashboardAction extends BaseAction
/**
* HTTP GET handler
*
* @return void|\Cake\Http\Response
* @return void
*/
protected function _get()
{
Expand Down

0 comments on commit ec53e0a

Please sign in to comment.