Skip to content

Commit f58d35e

Browse files
committed
fix scrutinizer issues
1 parent 874cb0f commit f58d35e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

tests/Type/UserErrorsType/BasicTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public function testValidationWithNoErrorCodes()
4646
{
4747
$type = UserErrorsType::create([
4848
'validate' => static function ($value) {
49+
return $value ? 0 : 1;
4950
},
5051
'type' => Type::id(),
5152
], ['upsertSku']);

tests/Type/ValidatedFieldDefinition/InputObjectValidationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ protected function setUp()
101101
'type' => $this->bookAttributesInputType,
102102
'errorCodes' => ['titleOrIdRequired'],
103103
'validate' => static function (?array $bookAttributes) {
104-
if ($bookAttributes === null) {
104+
if (!$bookAttributes) {
105105
return 0;
106106
}
107107

0 commit comments

Comments
 (0)