PluginProbe
PostNL for WooCommerce / 4.4.0
PostNL for WooCommerce v4.4.0
5.9.12 5.9.11 5.9.10 5.9.9 5.9.8 5.9.7 5.9.6 trunk 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.1.4 3.1.5 3.1.6 3.1.7 4.0.0 4.0.1 4.0.2 4.3.2 4.3.3 4.4.0 4.4.1 All 72 releases
woo-postnl / vendor / myparcelnl / sdk / src / Helper / LabelHelper.php

LabelHelper.php in PostNL for WooCommerce 4.4.0, at vendor/myparcelnl/sdk/src/Helper/LabelHelper.php

46 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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