public function hasProperty($nameOrProperty) { if ($nameOrProperty instanceof PhpProperty) { $nameOrProperty = $nameOrProperty->getName(); } return $this->properties->has($nameOrProperty); }