PDepend\Engine::countClasses PHP Method

countClasses() public method

Returns the number of analyzed php classes and interfaces.
public countClasses ( ) : integer
return integer
    public function countClasses()
    {
        if ($this->namespaces === null) {
            $msg = 'countClasses() doesn\'t work before the source was analyzed.';
            throw new \RuntimeException($msg);
        }
        $classes = 0;
        foreach ($this->namespaces as $namespace) {
            $classes += $namespace->getTypes()->count();
        }
        return $classes;
    }