GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Property   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
A isMultiValued() 0 4 1
A getType() 0 4 1
A getDefinition() 0 4 1
1
<?php
2
namespace Dkd\PhpCmis\DataObjects;
3
4
/*
5
 * This file is part of php-cmis-client.
6
 *
7
 * (c) Sascha Egerer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
use Dkd\PhpCmis\Data\PropertyInterface;
14
use Dkd\PhpCmis\Definitions\PropertyDefinitionInterface;
15
use Dkd\PhpCmis\Enum\Cardinality;
16
use Dkd\PhpCmis\Enum\PropertyType;
17
18
/**
19
 * Property Implementation.
20
 */
21
class Property extends AbstractPropertyData implements PropertyInterface
22
{
23
    /**
24
     * @var PropertyDefinitionInterface
25
     */
26
    protected $propertyDefinition;
27
28
    /**
29
     * Initialize the property with its definition and values
30
     *
31
     * @param PropertyDefinitionInterface $propertyDefinition
32
     * @param mixed[] $values
33
     */
34
    public function __construct(PropertyDefinitionInterface $propertyDefinition, array $values)
35
    {
36
        $this->propertyDefinition = $propertyDefinition;
37
        $this->setId($propertyDefinition->getId());
38
        $this->setDisplayName($propertyDefinition->getDisplayName());
39
        $this->setLocalName($propertyDefinition->getLocalName());
40
        $this->setQueryName($propertyDefinition->getQueryName());
41
        $this->setValues($values);
42
    }
43
44
    /**
45
     * Returns if the property is a multi-value property.
46
     *
47
     * @return boolean <code>true</code> if the property is multi-value property, <code>false</code> if the property is
48
     *     single-value property,
49
     */
50
    public function isMultiValued()
51
    {
52
        return Cardinality::cast($this->getDefinition()->getCardinality())->equals(Cardinality::MULTI);
53
    }
54
55
    /**
56
     * Returns the property data type.
57
     *
58
     * @return PropertyType the data type of the property
59
     */
60
    public function getType()
61
    {
62
        return $this->getDefinition()->getPropertyType();
63
    }
64
65
    /**
66
     * Returns the property definition.
67
     *
68
     * @return PropertyDefinitionInterface the property definition
69
     */
70
    public function getDefinition()
71
    {
72
        return $this->propertyDefinition;
73
    }
74
}
75