• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aimeos / aimeos-core / 19bfd2c9-77c1-48e1-a822-6de0edf8768c

11 Aug 2024 11:54AM UTC coverage: 91.806% (+0.004%) from 91.802%
19bfd2c9-77c1-48e1-a822-6de0edf8768c

push

circleci

aimeos
Simplified order coupon manager

13 of 13 new or added lines in 1 file covered. (100.0%)

25 existing lines in 5 files now uncovered.

10453 of 11386 relevant lines covered (91.81%)

59.5 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/MShop/Order/Item/Address/Base.php
1
<?php
2

3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2024
6
 * @package MShop
7
 * @subpackage Order
8
 */
9

10

11
namespace Aimeos\MShop\Order\Item\Address;
12

13

14
/**
15
 * Abstract class with constants for all order address items.
16
 *
17
 * @package MShop
18
 * @subpackage Order
19
 */
20
abstract class Base extends \Aimeos\MShop\Common\Item\Address\Base
21
{
22
        /**
23
         * Delivery address.
24
         */
25
        const TYPE_DELIVERY = 'delivery';
26

27
        /**
28
         * Billing address.
29
         */
30
        const TYPE_PAYMENT = 'payment';
31

32

33
        /**
34
         * Checks if the given address type is valid
35
         *
36
         * @param string $value Address type defined in \Aimeos\MShop\Order\Item\Address\Base
37
         * @return string Sanitized address type
38
         * @throws \Aimeos\MShop\Order\Exception If type is invalid
39
         * @deprecated 2025.01
40
         */
41
        protected function checkType( string $value ) : string
42
        {
43
                switch( $value )
44
                {
45
                        case \Aimeos\MShop\Order\Item\Address\Base::TYPE_DELIVERY:
46
                        case \Aimeos\MShop\Order\Item\Address\Base::TYPE_PAYMENT:
UNCOV
47
                                return (string) $value;
×
48
                }
49

UNCOV
50
                throw new \Aimeos\MShop\Order\Exception( sprintf( 'Address type "%1$s" not within allowed range', $value ) );
×
51
        }
52
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc