returns the class that declares this method

@return  MoufReflectionClass
190367
public function getDeclaringClass()
    {
    	if ($this->declaringClass) {
    		return $this->declaringClass;
    	}
    	 
    	$methodFile = $this->getFileName();
    	$methodStartLine = $this->getStartLine();
    	$methodEndLine = $this->getEndLine();
    	
    	$oldDeclaringClass = $this->getDeclaringClassWithoutTraits();
    	
    	// Let's scan all traits
    	$trait = $this->deepScanTraits($oldDeclaringClass->getTraits(), $methodFile, $methodStartLine, $methodEndLine);
    	if ($trait != null) {
    		$this->declaringClass = $trait;
    		return $trait;
    	} else {
    		$this->declaringClass = $oldDeclaringClass;
    		return $oldDeclaringClass;
    	}
    }
675348
public function getBaseClass()
    {
        if ($this->isAlias() && $this->baseClass === null) {
            return $this->alias;
        } elseif ($this->baseClass === null) {
            return $this->getDatabase()->getBaseClass();
        } else {
            return $this->baseClass;
        }
    }
1268975
public function getCssClass()
    {
        $class = self::CLASS_DEFAULT;

        if ($this->userView) {
            if ($this->new_post_at > $this->userView->new_last_seen) {
                $class = self::CLASS_NEW;
            } elseif ($this->edited_post_at > $this->userView->edited_last_seen) {
                $class = self::CLASS_EDITED;
            }
        } else {
            $class = self::CLASS_NEW;
        }
        return $class;
    }
463948
public function getReflector()
    {
        if ($this->reflector === null) {
            $this->reflector = new ReflectionClosure($this->closure, $this->code);
            $this->code = null;
        }

        return $this->reflector;
    }
405196
public function getMethods()
    {
        $moufMethods = array();
        foreach ($this->xmlRoot->method as $method) {
            $moufMethods[] = new MoufXmlReflectionMethod($this, $method);
        }
        
        return $moufMethods;
    }
1324323
private function getReflection(): \ReflectionClass
    {
        if ($this->_intruderReflection === null) {
            $this->_intruderReflection = new \ReflectionClass($this->_intruderInstance);
        }

        return $this->_intruderReflection;
    }
1134431
public function getMethods($filter = null)
    {
        $methods    = parent::getMethods();
        $moufMethods = array();
        foreach ($methods as $method) {
            $moufMethods[] = new MoufReflectionMethod($this, $method->getName());
        }
        
        return $moufMethods;
    }
360216
public function parentReflection()
    {
        $parentClass = $this->reflection->getParentClass();

        if (!empty($parentClass) && $parentClass->getName() != static::BASE_CLASS) {
            $parent = clone $this;
            $parent->reflection = $this->getParentClass();

            return $parent;
        }

        return null;
    }
778562
public function getExtension()
    {
        $extensionName  = $this->getExtensionName();
        if (null === $extensionName || false === $extensionName) {
            return null;
        }
        
        $moufRefExtension = new MoufReflectionExtension($extensionName);
        return $moufRefExtension;
    }
223536
private static function getReflection(): ReflectionClass
    {
        $class = static::class;

        if (array_key_exists($class, self::$reflections)) {
            return self::$reflections[$class];
        }

        self::$reflections[$class] = $reflection = new ReflectionClass($class);

        $constants = $reflection->getConstants();
        if ([] === $constants) {
            throw new LogicException(sprintf('Class %s must define Constants', static::class));
        }

        foreach ($constants as $value) {
            if (!\is_int($value)) {
                throw new LogicException('All enum constants must be in integer type');
            }
        }

        return $reflection;
    }
1330506
private function getReflectionClass($id, Definition $definition)
    {
        if (isset($this->reflectionClasses[$id])) {
            return $this->reflectionClasses[$id];
        }

        // Cannot use reflection if the class isn't set
        if (!$class = $definition->getClass()) {
            return false;
        }

        $class = $this->container->getParameterBag()->resolveValue($class);

        try {
            $reflector = new \ReflectionClass($class);
        } catch (\ReflectionException $e) {
            $reflector = false;
        }

        return $this->reflectionClasses[$id] = $reflector;
    }
1123337
protected function getModelReflection()
    {
        $modelClassName = str_replace('/', '\\', $this->input->getArgument('model'));

        try {
            $reflection = new ReflectionClass($this->getAppNamespace() . $modelClassName);
        } catch (\ReflectionException $e) {
            $reflection = new ReflectionClass($modelClassName);
        }

        if (!$reflection->isSubclassOf(Model::class) || !$reflection->isInstantiable()) {
            throw new NotAnInstanceOfException(sprintf('The model must be an instance of [%s]', Model::class));
        }

        return $reflection;
    }
954971
public function getReflectionMethod(string $method)
    {
        if (!isset($this->reflectionMethod[$method])) {
            $this->reflectionMethod[$method] = new ReflectionMethod($this, $method);
        }

        return $this->reflectionMethod[$method];
    }
322668
public function getClass()
    {
        try {
            $class = parent::getClass();
        } catch (\Exception $e) {
            return null;
        }
        return is_object($class) ? new ClassReflection($class->getName()) : null;
    }
619361
protected function getReflectionInfos()
    {
        try {
            $this->constructMethod = new \ReflectionMethod($this->className, "__construct");
            $params = $this->constructMethod->getParameters();
            $i = 0;
            foreach ($params as $param) {
                $paramsInfos = ['name' => $param->getName()];
                // Either the class is typehinted
                if (!empty($param->getClass())) {
                    $paramsInfos['class'] = $param->getClass()->getName();
                } elseif (!empty($this->propertyTypes[$param->getName()])) {
                    // Or we take it from the argument name
                    $paramsInfos['class'] = $this->propertyTypes[$param->getName()];
                }
                $this->requiredParams[$i++] = $paramsInfos;
            }
        } catch (\ReflectionException $e) {
            // There is no construct method but we don't really care
        }
    }
960897
public function getReflection($class)
    {
        $isObject = is_object($class);
        $identity = $isObject
            ? ObjectIdentity::createFromObject($class)
            : new ObjectIdentity(sprintf('%s@%s', \ReflectionClass::class, $class));
        
        if (!$this->hasShared($identity->getIdentifier())) {
            $reflection = $isObject ? new \ReflectionObject($class) : new \ReflectionClass($class);
            $this->setShared($identity->getIdentifier(), $reflection);
        }
        
        return $this->getShared($identity->getIdentifier());
    }
1240118
protected function getReflection() {
		if ($this->reflection === null) {
			try {
				$this->reflection = new ReflectionClass($this->class);
			} catch (ReflectionException $exception) {
				throw new InitializationFailure('Error occurred while service initialization by class "' . $this->class . '"', 0, $exception);
			}
		}
		
		return $this->reflection;
	}