| Total Complexity | 10 |
| Total Lines | 125 |
| Duplicated Lines | 0 % |
| Coverage | 60% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class Attribute extends Item implements AttributeSingle |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var static|null |
||
| 11 | */ |
||
| 12 | protected $fixed; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var static|null |
||
| 16 | */ |
||
| 17 | protected $default; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var bool |
||
| 21 | */ |
||
| 22 | protected $qualified = true; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var bool |
||
| 26 | */ |
||
| 27 | protected $nil = false; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | protected $use = self::USE_OPTIONAL; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return static|null |
||
| 36 | */ |
||
| 37 | public function getFixed() |
||
| 38 | { |
||
| 39 | return $this->fixed; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param static $fixed |
||
| 44 | * |
||
| 45 | * @return $this |
||
| 46 | */ |
||
| 47 | public function setFixed($fixed) |
||
| 48 | { |
||
| 49 | $this->fixed = $fixed; |
||
| 50 | |||
| 51 | return $this; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @return static|null |
||
| 56 | */ |
||
| 57 | public function getDefault() |
||
| 58 | { |
||
| 59 | return $this->default; |
||
| 60 | } |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param static $default |
||
| 64 | * |
||
| 65 | * @return $this |
||
| 66 | */ |
||
| 67 | public function setDefault($default) |
||
| 68 | { |
||
| 69 | $this->default = $default; |
||
| 70 | |||
| 71 | return $this; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return bool |
||
| 76 | */ |
||
| 77 | 1 | public function isQualified() |
|
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @param bool $qualified |
||
| 84 | * |
||
| 85 | * @return $this |
||
| 86 | */ |
||
| 87 | 1 | public function setQualified($qualified) |
|
| 88 | { |
||
| 89 | 1 | $this->qualified = $qualified; |
|
| 90 | |||
| 91 | 1 | return $this; |
|
| 92 | } |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return bool |
||
| 96 | */ |
||
| 97 | 1 | public function isNil() |
|
| 100 | } |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @param bool $nil |
||
| 104 | * |
||
| 105 | * @return $this |
||
| 106 | */ |
||
| 107 | 1 | public function setNil($nil) |
|
| 108 | { |
||
| 109 | 1 | $this->nil = $nil; |
|
| 110 | |||
| 111 | 1 | return $this; |
|
| 112 | } |
||
| 113 | |||
| 114 | /** |
||
| 115 | * @return string |
||
| 116 | */ |
||
| 117 | 1 | public function getUse() |
|
| 118 | { |
||
| 119 | 1 | return $this->use; |
|
| 120 | } |
||
| 121 | |||
| 122 | /** |
||
| 123 | * @param string $use |
||
| 124 | * |
||
| 125 | * @return $this |
||
| 126 | */ |
||
| 127 | 45 | public function setUse($use) |
|
| 132 | } |
||
| 133 | } |
||
| 134 |