BetterReflection\Reflection\ReflectionClass::inNamespace PHP Method

inNamespace() public method

Decide if this class is part of a namespace. Returns false if the class is in the global namespace or does not have a specified namespace.
public inNamespace ( ) : boolean
return boolean
    public function inNamespace()
    {
        return null !== $this->declaringNamespace && null !== $this->declaringNamespace->name;
    }

Usage Example

 /**
  * {@inheritDoc}
  */
 public function inNamespace()
 {
     return $this->betterReflectionClass->inNamespace();
 }