Mapping   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
c 2
b 0
f 0
lcom 0
cbo 0
dl 0
loc 51
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A usedBy() 0 4 1
A name() 0 4 1
A url() 0 4 1
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 12/17/15
5
 * Time: 11:46 PM.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\SchemaOrg;
12
13
/**
14
 * Class Mapping.
15
 */
16
class Mapping
17
{
18
    /**
19
     * @var string
20
     */
21
    private $schemaName;
22
    /**
23
     * @var string
24
     */
25
    private $propertyName;
26
    /**
27
     * @var string
28
     */
29
    private $propertyUrl;
30
31
    /**
32
     * @param $schemaClass
33
     * @param $propertyName
34
     * @param $propertyUrl
35
     */
36
    public function __construct($schemaClass, $propertyName, $propertyUrl)
37
    {
38
        $this->schemaName = (string) $schemaClass;
39
        $this->propertyName = (string) $propertyName;
40
        $this->propertyUrl = (string) $propertyUrl;
41
    }
42
43
    /**
44
     * @return string
45
     */
46
    public function usedBy()
47
    {
48
        return $this->schemaName;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function name()
55
    {
56
        return $this->propertyName;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function url()
63
    {
64
        return $this->propertyUrl;
65
    }
66
}
67