diff --git a/src/Parsing/V2/Field/FieldConfidence.php b/src/Parsing/V2/Field/FieldConfidence.php index 76ce76bf..24acb37f 100644 --- a/src/Parsing/V2/Field/FieldConfidence.php +++ b/src/Parsing/V2/Field/FieldConfidence.php @@ -27,7 +27,7 @@ public function rank(): int * @param FieldConfidence $other Other confidence value. * @return boolean True if this confidence is lower than or equal to the other. */ - public function lte(FieldConfidence $other): bool + public function lessThanOrEqual(FieldConfidence $other): bool { return $this->rank() <= $other->rank(); } @@ -37,7 +37,7 @@ public function lte(FieldConfidence $other): bool * @param FieldConfidence $other Other confidence value. * @return boolean True if this confidence is greater than or equal to the other. */ - public function gte(FieldConfidence $other): bool + public function greaterThanOrEqual(FieldConfidence $other): bool { return $this->rank() >= $other->rank(); } @@ -47,7 +47,7 @@ public function gte(FieldConfidence $other): bool * @param FieldConfidence $other Other confidence value. * @return boolean True if this confidence is lower than the other. */ - public function lt(FieldConfidence $other): bool + public function lessThan(FieldConfidence $other): bool { return $this->rank() < $other->rank(); } @@ -58,7 +58,7 @@ public function lt(FieldConfidence $other): bool * @param FieldConfidence $other Other confidence value. * @return boolean True if this confidence is greater than the other. */ - public function gt(FieldConfidence $other): bool + public function greaterThan(FieldConfidence $other): bool { return $this->rank() > $other->rank(); } @@ -69,7 +69,7 @@ public function gt(FieldConfidence $other): bool * @param FieldConfidence $other Other confidence value. * @return boolean True if this confidence is equal to the other. */ - public function eq(FieldConfidence $other): bool + public function equal(FieldConfidence $other): bool { return $this === $other; } diff --git a/tests/V2/Parsing/InferenceResponseTest.php b/tests/V2/Parsing/InferenceResponseTest.php index 90d6ea81..f0d9abeb 100644 --- a/tests/V2/Parsing/InferenceResponseTest.php +++ b/tests/V2/Parsing/InferenceResponseTest.php @@ -355,11 +355,15 @@ public function testCoordinatesAndLocationDataMustBeAccessible(): void ); $this->assertEquals(FieldConfidence::Medium, $dateField->confidence); $this->assertEquals(FieldConfidence::Medium->rank(), $dateField->confidence->rank()); - $this->assertTrue(FieldConfidence::Medium->eq($dateField->confidence)); + $this->assertTrue(FieldConfidence::Medium->equal($dateField->confidence)); $this->assertLessThan(FieldConfidence::High->rank(), $dateField->confidence->rank()); - $this->assertTrue(FieldConfidence::High->gt($dateField->confidence)); + $this->assertTrue(FieldConfidence::High->greaterThan($dateField->confidence)); + $this->assertTrue(FieldConfidence::Medium->greaterThanOrEqual($dateField->confidence)); + $this->assertTrue(FieldConfidence::High->greaterThanOrEqual($dateField->confidence)); $this->assertGreaterThan(FieldConfidence::Low->rank(), $dateField->confidence->rank()); - $this->assertTrue(FieldConfidence::Low->lt($dateField->confidence)); + $this->assertTrue(FieldConfidence::Low->lessThan($dateField->confidence)); + $this->assertTrue(FieldConfidence::Low->lessThanOrEqual($dateField->confidence)); + $this->assertTrue(FieldConfidence::Medium->lessThanOrEqual($dateField->confidence)); $this->assertEquals('Medium', $dateField->confidence->value); }