diff --git a/src/Expression/Description.php b/src/Expression/Description.php index 8aa3d514..a9d14754 100644 --- a/src/Expression/Description.php +++ b/src/Expression/Description.php @@ -9,7 +9,7 @@ class Description /** @var string */ private $description; - public function __construct(string $description, string $because) + public function __construct(string $description, string $because = '') { $this->description = $description; diff --git a/tests/Unit/Expressions/DescriptionTest.php b/tests/Unit/Expressions/DescriptionTest.php index 4aac4bff..c4486234 100644 --- a/tests/Unit/Expressions/DescriptionTest.php +++ b/tests/Unit/Expressions/DescriptionTest.php @@ -11,7 +11,7 @@ class DescriptionTest extends TestCase { public function test_it_should_return_description(): void { - $description = new Description('an example', ''); + $description = new Description('an example'); self::assertEquals('an example', $description->toString()); } diff --git a/tests/Unit/Rules/ConstraintsTest.php b/tests/Unit/Rules/ConstraintsTest.php index ac5c05bd..dc95dbfc 100644 --- a/tests/Unit/Rules/ConstraintsTest.php +++ b/tests/Unit/Rules/ConstraintsTest.php @@ -21,7 +21,7 @@ public function test_it_should_not_add_to_violation_if_constraint_is_not_violate $trueExpression = new class() implements Expression { public function describe(ClassDescription $theClass, string $because = ''): Description { - return new Description('', ''); + return new Description(''); } public function evaluate(ClassDescription $theClass, Violations $violations, string $because = ''): void