Passed
Push — main ( ef112d...d39948 )
by Pieter
03:42
created

Xml   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 72
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getNamespace() 0 3 1
A isWrapped() 0 3 1
A isAttribute() 0 3 1
A __construct() 0 3 1
A getPrefix() 0 3 1
A getName() 0 3 1
1
<?php
2
3
4
namespace Apie\OpenapiSchema\Spec;
5
6
7
use Apie\CommonValueObjects\KebabCaseString;
0 ignored issues
show
Bug introduced by
The type Apie\CommonValueObjects\KebabCaseString was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Apie\CommonValueObjects\Url;
9
use Apie\OpenapiSchema\Concerns\CompositeValueObjectWithExtension;
10
use Apie\OpenapiSchema\ValueObjects\SpecificationExtension;
11
use Apie\ValueObjects\ValueObjectInterface;
12
13
/**
14
 * @see https://swagger.io/specification/#xml-object
15
 */
16
class Xml implements ValueObjectInterface
17
{
18
    use CompositeValueObjectWithExtension;
19
20
    public function __construct()
21
    {
22
        $this->specificationExtension = new SpecificationExtension([]);
23
    }
24
25
    /**
26
     * @var KebabCaseString|null
27
     */
28
    private $name;
29
30
    /**
31
     * @var Url|null
32
     */
33
    private $namespace;
34
35
    /**
36
     * @var KebabCaseString|null
37
     */
38
    private $prefix;
39
40
    /**
41
     * @var bool|null
42
     */
43
    private $attribute;
44
45
    /**
46
     * @var bool|null
47
     */
48
    private $wrapped;
49
50
    /**
51
     * @return KebabCaseString|null
52
     */
53
    public function getName(): ?KebabCaseString
54
    {
55
        return $this->name;
56
    }
57
58
    /**
59
     * @return Url|null
60
     */
61
    public function getNamespace(): ?Url
62
    {
63
        return $this->namespace;
64
    }
65
66
    /**
67
     * @return KebabCaseString|null
68
     */
69
    public function getPrefix(): ?KebabCaseString
70
    {
71
        return $this->prefix;
72
    }
73
74
    /**
75
     * @return bool
76
     */
77
    public function isAttribute(): bool
78
    {
79
        return $this->attribute ?? false;
80
    }
81
82
    /**
83
     * @return bool
84
     */
85
    public function isWrapped(): bool
86
    {
87
        return $this->wrapped ?? false;
88
    }
89
}