|
@@ 150-155 (lines=6) @@
|
| 147 |
|
$paramsItem = array("длина" => $length, |
| 148 |
|
"ширина" => $width, |
| 149 |
|
"высота" => $height); |
| 150 |
|
foreach ($paramsItem as $k => $param) { |
| 151 |
|
$param = (int)$param; |
| 152 |
|
if ($param == 0) { |
| 153 |
|
throw new \Exception("Неправильно задан параметр '" . $k . "' места № " . (count($this->getGoodslist()) + 1) . "."); |
| 154 |
|
} |
| 155 |
|
} |
| 156 |
|
$this->goodsList[] = array('weight' => $weight, |
| 157 |
|
'length' => $length, |
| 158 |
|
'width' => $width, |
|
@@ 171-176 (lines=6) @@
|
| 168 |
|
public function addGoodsItemByVolume($weight, $volume) { |
| 169 |
|
$paramsItem = array("вес" => $weight, |
| 170 |
|
"объёмный вес" => $volume); |
| 171 |
|
foreach ($paramsItem as $k => $param) { |
| 172 |
|
$param = (float)$param; |
| 173 |
|
if ($param == 0.00) { |
| 174 |
|
throw new \ption("Неправильно задан параметр '" . $k . "' места № " . (count($this->getGoodslist()) + 1) . "."); |
| 175 |
|
} |
| 176 |
|
} |
| 177 |
|
$this->goodsList[] = array('weight' => $weight, |
| 178 |
|
'volume' => $volume); |
| 179 |
|
} |