Phan\Language\Element\Method::getIsMagicCall PHP Method

getIsMagicCall() public method

public getIsMagicCall ( ) : boolean
return boolean True if this is the magic `__call` method
    public function getIsMagicCall() : bool
    {
        return $this->getName() === '__call';
    }

Usage Example

Example #1
0
 /**
  * @return Method[]
  */
 public static function methodListFromReflectionClassAndMethod(Context $context, CodeBase $code_base, \ReflectionClass $class, \ReflectionMethod $reflection_method) : array
 {
     $method_fqsen = FullyQualifiedMethodName::fromStringInContext($reflection_method->getName(), $context);
     $reflection_method = new \ReflectionMethod($class->getName(), $reflection_method->name);
     $method = new Method($context, $reflection_method->name, new UnionType(), $reflection_method->getModifiers(), $method_fqsen);
     $method->setNumberOfRequiredParameters($reflection_method->getNumberOfRequiredParameters());
     $method->setNumberOfOptionalParameters($reflection_method->getNumberOfParameters() - $reflection_method->getNumberOfRequiredParameters());
     if ($method->getIsMagicCall() || $method->getIsMagicCallStatic()) {
         $method->setNumberOfOptionalParameters(999);
         $method->setNumberOfRequiredParameters(0);
     }
     return self::functionListFromFunction($method, $code_base);
 }
All Usage Examples Of Phan\Language\Element\Method::getIsMagicCall