| 1 |
<?php declare(strict_types=1); |
| 2 |
/** |
| 3 |
* If you want to add improvements, please create a fork in our GitHub: |
| 4 |
* https://github.com/myparcelnl |
| 5 |
* |
| 6 |
* @author Reindert Vetter <[email protected]> |
| 7 |
* @copyright 2010-2020 MyParcel |
| 8 |
* @license http://creativecommons.org/licenses/by-nc-nd/3.0/nl/deed.en_US CC BY-NC-ND 3.0 NL |
| 9 |
* @link https://github.com/myparcelnl/sdk |
| 10 |
* @since File available since Release v0.1.0 |
| 11 |
*/ |
| 12 |
|
| 13 |
namespace MyParcelNL\Sdk\src\Helper; |
| 14 |
|
| 15 |
class LabelHelper |
| 16 |
{ |
| 17 |
/** |
| 18 |
* Generating positions for A4 paper |
| 19 |
* |
| 20 |
* @param int $start |
| 21 |
* |
| 22 |
* @return string |
| 23 |
*/ |
| 24 |
public static function getPositions($start) |
| 25 |
{ |
| 26 |
$aPositions = []; |
| 27 |
switch ($start) { |
| 28 |
/** @noinspection PhpMissingBreakStatementInspection */ |
| 29 |
case 1: |
| 30 |
$aPositions[] = 1; |
| 31 |
/** @noinspection PhpMissingBreakStatementInspection */ |
| 32 |
case 2: |
| 33 |
$aPositions[] = 2; |
| 34 |
/** @noinspection PhpMissingBreakStatementInspection */ |
| 35 |
case 3: |
| 36 |
$aPositions[] = 3; |
| 37 |
/** @noinspection PhpMissingBreakStatementInspection */ |
| 38 |
case 4: |
| 39 |
$aPositions[] = 4; |
| 40 |
break; |
| 41 |
} |
| 42 |
|
| 43 |
return implode(';', $aPositions); |
| 44 |
} |
| 45 |
} |
| 46 |
|