/** * @test */ public function returnsOccuranceSetInConstructor() { $descriptor = new PropertyDescriptor(0, 'property', 5); $this->assertEquals(5, $descriptor->getOccurance()); }
/** * Returns whether this candidate matches the given propertydescriptor * * @param PropertyDescriptor $propertyDescriptor * @return bool */ public function matches(PropertyDescriptor $propertyDescriptor) : bool { $property = $propertyDescriptor->getName(); $occurance = $propertyDescriptor->getOccurance(); return $property === $this->property && $occurance === $this->occurance; }