Skip to content

Commit

Permalink
Remove deprecated class & methods
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Oct 2, 2017
1 parent 9338fdd commit b55f41c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 85 deletions.
40 changes: 0 additions & 40 deletions src/BigDecimal.php
Original file line number Diff line number Diff line change
Expand Up @@ -547,16 +547,6 @@ public function getUnscaledValue() : BigInteger
return BigInteger::create($this->value);
}

/**
* @deprecated use getUnscaledValue().
*
* @return BigInteger
*/
public function unscaledValue() : BigInteger
{
return $this->getUnscaledValue();
}

/**
* @return int
*/
Expand All @@ -565,16 +555,6 @@ public function getScale() : int
return $this->scale;
}

/**
* @deprecated use getScale().
*
* @return int
*/
public function scale() : int
{
return $this->getScale();
}

/**
* Returns a string representing the integral part of this decimal number.
*
Expand All @@ -593,16 +573,6 @@ public function getIntegral() : string
return substr($value, 0, -$this->scale);
}

/**
* @deprecated use getIntegral().
*
* @return string
*/
public function integral() : string
{
return $this->getIntegral();
}

/**
* Returns a string representing the fractional part of this decimal number.
*
Expand All @@ -623,16 +593,6 @@ public function getFraction() : string
return substr($value, -$this->scale);
}

/**
* @deprecated use getFraction().
*
* @return string
*/
public function fraction() : string
{
return $this->getFraction();
}

/**
* {@inheritdoc}
*/
Expand Down
10 changes: 0 additions & 10 deletions src/BigNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,16 +320,6 @@ public function isPositiveOrZero() : bool
*/
abstract public function getSign() : int;

/**
* @deprecated use getSign().
*
* @return int
*/
public function sign() : int
{
return $this->getSign();
}

/**
* Compares this number to the given one.
*
Expand Down
20 changes: 0 additions & 20 deletions src/BigRational.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,6 @@ public function getNumerator() : BigInteger
return $this->numerator;
}

/**
* @deprecated use getNumerator().
*
* @return BigInteger
*/
public function numerator() : BigInteger
{
return $this->getNumerator();
}

/**
* @return BigInteger
*/
Expand All @@ -167,16 +157,6 @@ public function getDenominator() : BigInteger
return $this->denominator;
}

/**
* @deprecated use getDenominator().
*
* @return BigInteger
*/
public function denominator() : BigInteger
{
return $this->getDenominator();
}

/**
* Returns the quotient of the division of the numerator by the denominator.
*
Expand Down
12 changes: 0 additions & 12 deletions src/Exception/ArithmeticException.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/Exception/IntegerOverflowException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ class IntegerOverflowException extends MathException
/**
* @param BigInteger $value
*
* @return ArithmeticException
* @return IntegerOverflowException
*/
public static function toIntOverflow(BigInteger $value) : ArithmeticException
public static function toIntOverflow(BigInteger $value) : IntegerOverflowException
{
$message = '%s is out of range %d to %d and cannot be represented as an integer.';

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/MathException.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
*
* This class is abstract to ensure that only fine-grained exceptions are thrown throughout the code.
*/
abstract class MathException extends ArithmeticException
abstract class MathException extends \RuntimeException
{
}

0 comments on commit b55f41c

Please sign in to comment.