src/Mouf/Reflection/MoufReflectionMethod.php
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;
    	}
    }
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;
    	}
    }
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 ; } }
returns the class that declares this method

@return  MoufReflectionClass
returns the class that declares this method