Fixed formatting to match PSR-2
This commit is contained in:
parent
2938be5a2d
commit
04cae3c295
@ -58,7 +58,6 @@ class Ship
|
||||
|
||||
// Build approvedCodes
|
||||
foreach ($this->shipping_options as $shipping_group => $row) {
|
||||
|
||||
foreach ($row as $_carrier => $row2) {
|
||||
if (!isset($approvedCodes[$_carrier])) {
|
||||
$approvedCodes[$_carrier] = [];
|
||||
@ -89,9 +88,7 @@ class Ship
|
||||
$group_codes = array_keys($row2);
|
||||
|
||||
if (! empty($rates[$carrier])) {
|
||||
|
||||
foreach ($rates[$carrier] as $row3) {
|
||||
|
||||
if (in_array($row3->getCode(), $group_codes)) {
|
||||
$row3->setCarrier($carrier);
|
||||
|
||||
@ -127,9 +124,7 @@ class Ship
|
||||
$group_codes = array_keys($row2);
|
||||
|
||||
if (!empty($rates[$carrier])) {
|
||||
|
||||
foreach ($rates[$carrier] as $row3) {
|
||||
|
||||
if (in_array($row3->getCode(), $group_codes)) {
|
||||
$row3->setCarrier($carrier);
|
||||
$display_rates[$shipping_group][] = $row3;
|
||||
|
@ -89,7 +89,7 @@ class Rate extends RateAdapter
|
||||
$this->userId = Arr::get($options, 'userId');
|
||||
$this->password = Arr::get($options, 'password');
|
||||
$this->shipperNumber = Arr::get($options, 'shipperNumber');
|
||||
$this->approvedCodes = Arr::get($options, 'approvedCodes',[
|
||||
$this->approvedCodes = Arr::get($options, 'approvedCodes', [
|
||||
'03',
|
||||
'12',
|
||||
]);
|
||||
|
@ -1,10 +1,12 @@
|
||||
<?php
|
||||
namespace pdt256\Shipping;
|
||||
|
||||
class Validator {
|
||||
public static function checkIfNull($value, $name) {
|
||||
if ($value === null) {
|
||||
throw new \LogicException("$name is not set");
|
||||
}
|
||||
}
|
||||
}
|
||||
class Validator
|
||||
{
|
||||
public static function checkIfNull($value, $name)
|
||||
{
|
||||
if ($value === null) {
|
||||
throw new \LogicException("$name is not set");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user