protected function getDeclarationPlace(\ReflectionMethod $reflectionMethod, \ReflectionClass $declaringClass)
    {
        $filename = $this->pool->fileService->filterFilePath($reflectionMethod->getFileName());
        if (empty($filename) === true) {
            return static::UNKNOWN_DECLARATION;
        }

        // If the filename of the $declaringClass and the $reflectionMethod differ,
        // we are facing a trait here.
        if ($reflectionMethod->getFileName() !== $declaringClass->getFileName() &&
            method_exists($declaringClass, 'getTraits')
        ) {
            // There is no real clean way to get the name of the trait that we
            // are looking at.
            $traitName = ':: unable to get the trait name ::';
            $trait = $this->retrieveDeclaringReflection($reflectionMethod, $declaringClass);
            if ($trait !== false) {
                $traitName = $trait->getName();
            }

            return $filename . "\n" .
                'in trait: ' . $traitName . "\n" .
                'in line: ' . $reflectionMethod->getStartLine();
        } else {
            return $filename . "\n" .
                'in class: ' . $reflectionMethod->class . "\n" .
                'in line: ' . $reflectionMethod->getStartLine();
        }
    }