-
Notifications
You must be signed in to change notification settings - Fork 1
Conversation
} | ||
|
||
return true; | ||
return count($this->verdicts->failing()) === 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1: Literals should be on the left side of an expression, for the sake of redability.
$name | ||
)); | ||
} | ||
|
||
return true; | ||
return $verdictsForField->failing()->count === 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1
use Countable; | ||
use IteratorAggregate; | ||
|
||
class Verdicts implements Countable, IteratorAggregate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add basic phpDoc
return new static(array_filter($this->verdicts, $function)); | ||
} | ||
|
||
public function reduce(callable $function, $initial = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot return type here
return $this->verdicts; | ||
} | ||
|
||
public function /* Countable */ count(): int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, but is this PSR-2 compliant to have a comment here?
Besides those issues, I personally don't like the name Also, I'd like to change |
Closing as the |
No description provided.