staticTypeMapper = $staticTypeMapper; $this->propertyNaming = $propertyNaming; $this->nodeTypeResolver = $nodeTypeResolver; } public function resolve(Param $param) : ?string { // nothing to verify if ($param->type === null) { return null; } // include nullable too // skip date time + date time interface, as should be kept if ($this->nodeTypeResolver->isObjectType($param->type, new ObjectType('DateTimeInterface'))) { return null; } $staticType = $this->staticTypeMapper->mapPhpParserNodePHPStanType($param->type); $expectedName = $this->propertyNaming->getExpectedNameFromType($staticType); if (!$expectedName instanceof ExpectedName) { return null; } return $expectedName->getName(); } }