Completed
Push — develop ( 168e99...0122be )
by
unknown
18:37 queued 07:11
created

SettingsContainer::getInvoiceAddress()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 */
9
10
/**  */
11
namespace Orders\Entity;
12
13
use Settings\Entity\ModuleSettingsContainer;
14
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
15
use Settings\Entity\InitializeAwareSettingsContainerInterface;
16
17
/**
18
 * @ODM\EmbeddedDocument
19
 */
20
class SettingsContainer extends ModuleSettingsContainer implements InitializeAwareSettingsContainerInterface
21
{
22
    
23
    /**
24
     * @ODM\EmbedOne(targetDocument="InvoiceAddressSettings")
25
     */
26
    protected $invoiceAddress;
27
28
    /**
29
     * Initialize the settings container
30
     */
31
    public function init()
32
    {
33
        $this->getInvoiceAddress();
34
    }
35
36
    /**
37
     * Get localization settings
38
     *
39
     * @return LocalizationSettings
40
     */
41
    public function getInvoiceAddress()
42
    {
43
        if (!$this->invoiceAddress) {
44
            $this->invoiceAddress = new InvoiceAddressSettings();
45
        }
46
        return $this->invoiceAddress;
47
    }
48
}
49