public function getExactlyOneClass($fileSource) {
        if (count($this->ast) !== 1 || $this->ast[0]->getType() !== "Stmt_Class")
            throw new PhpParserException("\"$fileSource\" does not define exactly one class");
        return $this->ast[0];
    }
public function getExactlyOneClass($fileSource) {
        if (count($this->ast) !== 1 || $this->ast[0]->getType() !== "Stmt_Class")
            throw new PhpParserException("\"$fileSource\" does not define exactly one class");
        return $this->ast[0];
    }
public function getExactlyOneClass ( $ fileSource ) { if ( count ( $ this -> ast ) !== 1 || $ this -> ast [ 0 ] -> getType ( ) !== "Stmt_Class" ) throw new PhpParserException ( "\"$fileSource\" does not define exactly one class" ) ; return $ this -> ast [ 0 ] ; }
Asserts that the code defines one class and returns it.
@param string $fileSource
@return \PhpParser\Node\Stmt\Class_
Asserts that the code defines one class and returns it .