Skip to content

Commit edd2e6a

Browse files
author
Viktor Tymchynskyi
committed
MAGETWO-32923: Creating Invoice
- Fix SubjectReader
1 parent 8e89149 commit edd2e6a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/code/Magento/Payment/Gateway/Helper/SubjectReader.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ public static function readPayment(array $subject)
3434
*/
3535
public static function readAmount(array $subject)
3636
{
37-
if (!isset($subject['amount'])
38-
|| $subject['amount'] && !is_numeric($subject['amount'])) {
37+
if (!isset($subject['amount']) || !is_numeric($subject['amount'])) {
3938
throw new \InvalidArgumentException('Amount should be provided');
4039
}
4140

@@ -50,7 +49,7 @@ public static function readAmount(array $subject)
5049
*/
5150
public static function readField(array $subject)
5251
{
53-
if (!isset($subject['field']) && !is_string($subject['field'])) {
52+
if (!isset($subject['field']) || !is_string($subject['field'])) {
5453
throw new \InvalidArgumentException();
5554
}
5655

0 commit comments

Comments
 (0)