Skip to content

Conversation

@devnix
Copy link
Contributor

@devnix devnix commented May 2, 2025

Depends on #306

@devnix devnix force-pushed the phpstan-level-6 branch from 7e3984b to ede8f6f Compare May 3, 2025 15:58
foreach ($comments as $comment) {
$key = array_search($comment, $this->comments);

if (is_int($key)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My previous question was more related to this change.

As far as I understand, should Comments::$comments be an array of integer keys only? If that is correct, this condition would be unnecessary :)

Copy link
Member

Choose a reason for hiding this comment

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

$key can be false, if the comment wasn't found.

@devnix devnix force-pushed the phpstan-level-6 branch from 1042e66 to fcaab6e Compare May 5, 2025 07:41
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