0 follower

Final Class Yiisoft\Proxy\Config\MethodConfig

InheritanceYiisoft\Proxy\Config\MethodConfig

Public Methods

Hide inherited methods

Method Description Defined By
__construct() Yiisoft\Proxy\Config\MethodConfig
hasReturnType() Whether a method has return type. Yiisoft\Proxy\Config\MethodConfig

Property Details

Hide inherited properties

$modifiers public property

A list of modifiers, for example: ['abstract', 'public'].

public string[] $modifiers null
$name public property

A name without parentheses. For example: getInstance.

public string $name null
$parameters public property
$returnType public property

Return type config. null means no return type specified.

Method Details

Hide inherited methods

__construct() public method

public __construct( array $modifiers, string $name, array $parameters, Yiisoft\Proxy\Config\TypeConfig|null $returnType ): mixed
$modifiers array
$name string
$parameters array
$returnType Yiisoft\Proxy\Config\TypeConfig|null

                public function __construct(
    /**
     * @var string[] A list of modifiers, for example: `['abstract', 'public']`.
     */
    public array $modifiers,
    /**
     * @var string A name without parentheses. For example: `getInstance`.
     */
    public string $name,
    /**
     * @var ParameterConfig[] A map where key is a {@see ParameterConfig::$name} and value is {@see ParameterConfig}
     * instance.
     * @psalm-var array<string, ParameterConfig>
     */
    public array $parameters,
    /**
     * @var TypeConfig|null Return type config. `null` means no return type specified.
     */
    public ?TypeConfig $returnType,
) {
}

            
hasReturnType() public method

Whether a method has return type.

public hasReturnType( ): boolean
return boolean

true if return type specified and false otherwise.

                public function hasReturnType(): bool
{
    return $this->returnType !== null;
}