-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from zfbrasil/hotfix/dependencies
Update dependency constraints
- Loading branch information
Showing
16 changed files
with
95 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
use Money\InvalidArgumentException; | ||
use Money\Money; | ||
use Zend\Filter\AbstractFilter; | ||
use Zend\Filter\Exception; | ||
|
||
/** | ||
* @author Gabriel Schmitt <[email protected]> | ||
|
@@ -14,10 +13,11 @@ | |
class AmountFilter extends AbstractFilter | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* {@inheritdoc} | ||
* | ||
* @throws InvalidArgumentException | ||
* @return int | ||
* | ||
* @return int|null | ||
*/ | ||
public function filter($value) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,40 +9,40 @@ | |
use ZFBrasil\DoctrineMoneyModule\InputFilter\MoneyInputFilter; | ||
|
||
/** | ||
* Money form element that will make it very easy to work with money and currencies | ||
* Money form element that will make it very easy to work with money and currencies. | ||
* | ||
* @author Fábio Carneiro <[email protected]> | ||
* @license MIT | ||
*/ | ||
class MoneyFieldset extends Fieldset implements InputFilterProviderInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* {@inheritdoc} | ||
*/ | ||
public function init() | ||
{ | ||
$this->add([ | ||
'type' => Number::class, | ||
'name' => 'amount', | ||
'options' => [ | ||
'label' => 'Amount' | ||
'label' => 'Amount', | ||
], | ||
'attributes' => [ | ||
'step' => '0.01', | ||
] | ||
], | ||
]); | ||
|
||
$this->add([ | ||
'type' => CurrencySelect::class, | ||
'name' => 'currency', | ||
'options' => [ | ||
'label' => 'Currency' | ||
] | ||
'label' => 'Currency', | ||
], | ||
]); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* {@inheritdoc} | ||
*/ | ||
public function getInputFilterSpecification() | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,28 +7,28 @@ | |
use Money\Currency; | ||
|
||
/** | ||
* Hydrator for Money object | ||
* Hydrator for Money object. | ||
* | ||
* @author Fábio Carneiro <[email protected]> | ||
* @license MIT | ||
*/ | ||
class MoneyHydrator implements HydratorInterface | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* {@inheritdoc} | ||
*/ | ||
public function extract($object) | ||
{ | ||
return [ | ||
'amount' => $object->getAmount(), | ||
'currency' => $object->getCurrency()->getName() | ||
'currency' => $object->getCurrency()->getName(), | ||
]; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* {@inheritdoc} | ||
* | ||
* @return Money | ||
* @return Money|null | ||
*/ | ||
public function hydrate(array $data, $object) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.