AbstractProperties   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 1
c 3
b 0
f 1
lcom 0
cbo 0
dl 0
loc 27
ccs 4
cts 4
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
init() 0 1 ?
1
<?php
2
3
/*
4
 * This file is part of the kaloa/xmp package.
5
 *
6
 * For full copyright and license information, please view the LICENSE file
7
 * that was distributed with this source code.
8
 */
9
10
namespace Kaloa\Xmp\Properties;
11
12
use DOMXPath;
13
14
/**
15
 * Shared base class for XMP property schemata.
16
 */
17
abstract class AbstractProperties
18
{
19
    /**
20
     * XPath instance for a Kaloa\Xmp\Document.
21
     *
22
     * @var DOMXPath
23
     */
24
    protected $xPath;
25
26
    /**
27
     * Initializes the instance.
28
     *
29
     * @param DOMXPath $xPath XPath instance for a Kaloa\Xmp\Document
30
     */
31 1
    public function __construct(DOMXPath $xPath)
32
    {
33 1
        $this->xPath = $xPath;
34
35 1
        $this->init();
36 1
    }
37
38
    /**
39
     * Implementing classes should place initialization code here rather than
40
     * overwriting __construct.
41
     */
42
    abstract protected function init();
43
}
44