Skip to content

Commit

Permalink
Merge pull request #135 from frederikbosch/deprecated_remove
Browse files Browse the repository at this point in the history
remove deprecated methods, fixes #45
  • Loading branch information
sagikazarmark committed Jan 13, 2016
2 parents d5806aa + e587512 commit 6df55c5
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 40 deletions.
12 changes: 0 additions & 12 deletions src/Currency.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,6 @@ public function __construct($code)
$this->code = $code;
}

/**
* Returns the currency code.
*
* @return string
*
* @deprecated Use getCode() instead
*/
public function getName()
{
return $this->code;
}

/**
* Returns the currency code.
*
Expand Down
12 changes: 0 additions & 12 deletions src/CurrencyPair.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,6 @@ public function getBaseCurrency()
return $this->baseCurrency;
}

/**
* Returns the conversion ratio.
*
* @return float
*
* @deprecated Use getConversionRatio() instead
*/
public function getRatio()
{
return $this->conversionRatio;
}

/**
* Returns the conversion ratio.
*
Expand Down
12 changes: 0 additions & 12 deletions src/Money.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,6 @@ public function lessThanOrEqual(Money $other)
return 0 >= $this->compare($other);
}

/**
* Returns the value represented by this object.
*
* @deprecated Use getAmount() instead
*
* @return int
*/
public function getUnits()
{
return $this->amount;
}

/**
* Returns the value represented by this object.
*
Expand Down
2 changes: 0 additions & 2 deletions tests/CurrencyPairTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,13 @@ public function testConstructorWithNonNumericRatio($nonNumericRatio)
}

/**
* @covers ::getRatio
* @covers ::getConversionRatio
*/
public function testGetRatio()
{
$ratio = 1.2500;
$pair = new CurrencyPair(new Currency('EUR'), new Currency('USD'), $ratio);

$this->assertEquals($ratio, $pair->getRatio());
$this->assertEquals($ratio, $pair->getConversionRatio());
}

Expand Down
2 changes: 0 additions & 2 deletions tests/CurrencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ public function testConstructor()

/**
* @covers ::getCode
* @covers ::getName
* @covers ::__toString
*/
public function testCode()
{
$this->assertEquals('EUR', $this->euro1->getCode());
$this->assertEquals('EUR', $this->euro1->getName());
$this->assertEquals('EUR', (string) $this->euro1);
}

Expand Down

0 comments on commit 6df55c5

Please sign in to comment.