Skip to content
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

docs: fix phpstan ignored errors in app/ and admin/starter/tests/ #8645

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Mar 21, 2024

Description

  • add checking admin/starter/tests by PHPStan
  • add PHPDoc types

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • [] Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

@@ -72,6 +72,8 @@ class Logger extends BaseConfig
*
* Handlers are executed in the order defined in this array, starting with
* the handler on top and continuing down.
*
* @var array<string, array<string, int|list<string>|string>>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FileHandler::class is string or class-string?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's class-string. Fixed.

@@ -106,7 +108,7 @@ class Routing extends BaseRouting
* 'blog' => 'Acme\Blog\Controllers',
* ]
*
* @var array [ uri_segment => namespace ]
* @var array<string, string> [ uri_segment => namespace ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example(E.g.) is clear to me, I think [ uri_segment => namespace ] is not needed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@@ -104,7 +106,7 @@ class Routing extends BaseConfig
* 'blog' => 'Acme\Blog\Controllers',
* ]
*
* @var array [ uri_segment => namespace ]
* @var array<string, string> [ uri_segment => namespace ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kenjis kenjis merged commit 2c829f3 into codeigniter4:develop Mar 24, 2024
62 checks passed
@kenjis kenjis deleted the fix-phpstan-errors-in-app-and-tests branch March 24, 2024 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants