Skip to content

Commit dfe196f

Browse files
committed
Merge pull request #3807 in SW/shopware from sw-15505/5.2/remove-unneeded-method to 5.2
* commit 'd6764875294cd053380481c1d475a6e5fd46b7e6': SW-15505 - Remove unneeded intValue method
2 parents 45e6986 + d676487 commit dfe196f

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

tests/Mink/features/bootstrap/Element/HeaderCart.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function checkCart($quantity, $amount)
5050
$element = Helper::findElements($this, ['quantity', 'amount']);
5151

5252
$check = array(
53-
'quantity' => array(Helper::intValue($element['quantity']->getText()), $quantity),
53+
'quantity' => array((int)$element['quantity']->getText(), $quantity),
5454
'amount' => Helper::floatArray(array($element['amount']->getText(), $amount))
5555
);
5656

tests/Mink/features/bootstrap/Helper.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ public static function floatValue($value)
7979
return floatval($matches[0]);
8080
}
8181

82-
/**
83-
* Converts the value to an integer
84-
* @param $value
85-
* @return int
86-
*/
87-
public static function intValue($value)
88-
{
89-
if (is_int(($value))) {
90-
return $value;
91-
}
92-
93-
return intval($value);
94-
}
95-
9682
/**
9783
* Converts values with key in $keys to floats
9884
* @param array $values

0 commit comments

Comments
 (0)