tryParseInvalidParam example

$paramDoc = $this->findDocForParam($paramDocs$parameter->getName()$method$docBlock);

                $typeInformation = $this->getTypeInformation($parameter->getType()$paramDoc$scriptServices);

                $default = $parameter->isDefaultValueAvailable() ? mb_strtolower(var_export($parameter->getDefaultValue(), true)) : null;

                $arguments[] = array_merge(
                    ['name' => $parameter->getName(), 'default' => $default],
                    $typeInformation
                );
            } catch (\Exception $e) {
                $typeInformation = $this->tryParseInvalidParam($docBlock$parameter->getName());

                if ($typeInformation === null) {
                    throw $e;
                }

                $default = null;
                // @phpstan-ignore-next-line                 if ($parameter->isDefaultValueAvailable()) {
                    $default = mb_strtolower(var_export($parameter->getDefaultValue(), true));
                }

                
Home | Imprint | This part of the site doesn't use cookies.