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

Xml::isAttribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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
}