Page MenuHomeDevCentral

CodeMethod.php
No OneTemporary

CodeMethod.php

<?php
declare(strict_types=1);
namespace Keruald\OmniTools\Reflection;
use Keruald\OmniTools\Collections\Vector;
use ReflectionMethod;
use ReflectionParameter;
class CodeMethod extends CodeFunction {
///
/// Properties
///
private ReflectionMethod $method;
///
/// Constructor
///
public static function fromReflectionMethod (ReflectionMethod $method) : self {
$instance = new self;
$instance->method = $method;
return $instance;
}
///
/// Arguments helper methods
///
public function getArgumentsType () : Vector {
return Vector::from($this->method->getParameters())
->map(fn(ReflectionParameter $param) => CodeFunction::getParameterType($param));
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Nov 1, 17:54 (1 d, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3117250
Default Alt Text
CodeMethod.php (774 B)

Event Timeline