Skip to content

Fix: Repair conflicts and emove the Debug ignore errors.#7801

Merged
kenjis merged 4 commits intocodeigniter4:developfrom
kai890707:20230808-debug-phpstan
Aug 11, 2023
Merged

Fix: Repair conflicts and emove the Debug ignore errors.#7801
kenjis merged 4 commits intocodeigniter4:developfrom
kai890707:20230808-debug-phpstan

Conversation

@kai890707
Copy link
Copy Markdown
Contributor

@kai890707 kai890707 commented Aug 9, 2023

Description
See #7731

Sorry, There was a conflict with a previous modification (#7796) and due to my operational issues I have reorganized the complete modification into a new PR.

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

@kai890707 kai890707 changed the title Fix: Repair conflicts and emove the Debug ignore errors. Fix: Repair conflicts and emove the Debug ignore errors. Aug 9, 2023
Comment thread system/Debug/Exceptions.php Outdated
* @codeCoverageIgnore
*
* @return void
* @phpstan-return never|void
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It seems never is not returned. See https://phpstan.org/writing-php-code/phpdoc-types#bottom-type

Suggested change
* @phpstan-return never|void

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed there to @phpstan-return void .

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If @return and @phpstan-return are the same, @phpstan-return is not needed.
Remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

Comment thread system/Debug/Toolbar.php Outdated
* @param ResponseInterface $response
*
* @return void
* @phpstan-return never|void
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any exit() or die() in this method?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There does not include exit() or die().
So, I changed there to @phpstan-return void.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done.

Copy link
Copy Markdown
Member

@kenjis kenjis 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 76b1e35 into codeigniter4:develop Aug 11, 2023
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