MDL-71036 phpunit: Stricter signature matching

This commit is contained in:
Eloy Lafuente (stronk7)
2021-03-11 23:07:30 +01:00
parent 77f09eccfe
commit 87680e8b2b
@@ -86,7 +86,7 @@ class phpunit_constraint_object_is_equal_with_exceptions extends PHPUnit\Framewo
* @return mixed
* @throws PHPUnit\Framework\ExpectationFailedException
*/
public function evaluate($other, $description = '', $shouldreturnesult = false) {
public function evaluate($other, string $description = '', bool $shouldreturnesult = false): ?bool {
foreach ($this->keys as $key => $comparison) {
if (isset($other->$key) || isset($this->capturedvalue->$key)) {
// One of the keys is present, therefore run the comparison.