public function __equationToString()
    {
        $str = '';
        $a = $this->getSlope();
        if ($a!=1) {
            $str .= "({$a} * x)";
        } else {
            $str .= "x";
        }
        $b = $this->getYIntercept();
        if ($b!=0) {
            $str .= " + {$b}";
        }
        return "y = f(x){ {$str} }";
    }
public function __equationToString()
    {
        $str = '';
        $a = $this->getSlope();
        if ($a!=1) {
            $str .= "({$a} * x)";
        } else {
            $str .= "x";
        }
        $b = $this->getYIntercept();
        if ($b!=0) {
            $str .= " + {$b}";
        }
        return "y = f(x){ {$str} }";
    }
public function __equationToString ( ) { $ str = '' ; $ a = $ this -> getSlope ( ) ; if ( $ a != 1 ) { $ str .= "({$a} * x)" ; } else { $ str .= "x" ; } $ b = $ this -> getYIntercept ( ) ; if ( $ b != 0 ) { $ str .= " + {$b}" ; } return "y = f(x){ {$str} }" ; }
Write an algebraic function of the line

y = (a * x) + b

@return  string
Write an algebraic function of the line