protected function _divisors()
    {
        if (!$this->_decimal()->zero) {
            throw new \RuntimeException('You can only get divisors from integers!');
        }

        $n = abs($this->value);
        $a = new A();

        for ($i = 1; $i <= $n; $i++) {
            if ($n % $i == 0) {
                $a->add(new self($i));
            }
        }

        return $a;
    }
protected function _divisors()
    {
        if (!$this->_decimal()->zero) {
            throw new \RuntimeException('You can only get divisors from integers!');
        }

        $n = abs($this->value);
        $a = new A();

        for ($i = 1; $i <= $n; $i++) {
            if ($n % $i == 0) {
                $a->add(new self($i));
            }
        }

        return $a;
    }
protected function _divisors ( ) { if ( ! $ this -> _decimal ( ) -> zero ) { throw new \ RuntimeException ( 'You can only get divisors from integers!' ) ; } $ n = abs ( $ this -> value ) ; $ a = new A ( ) ; for ( $ i = 1 ; $ i <= $ n ; $ i ++ ) { if ( $ n % $ i == 0 ) { $ a -> add ( new self ( $ i ) ) ; } } return $ a ; }
Gets divisors for the current integer numbers.

If current number is negative, divisors will be based on its positive
version.

@throws \RuntimeException If current number is not an integer
@return A Instance of A class
Gets divisors for the current integer numbers .