Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
7 | #[\Attribute] |
||
8 | class StringProperty extends AbstractProperty |
||
9 | { |
||
10 | public function __construct( |
||
36 | ); |
||
37 | } |
||
38 | |||
39 | public function getLength(): int |
||
40 | { |
||
41 | return $this->length; |
||
42 | } |
||
43 | |||
44 | public function withLength(int $length): self |
||
45 | { |
||
46 | $self = clone $this; |
||
47 | $self->length = $length; |
||
48 | |||
49 | return $self; |
||
50 | } |
||
51 | |||
52 | public function getReplace(): string |
||
53 | { |
||
54 | return $this->replace; |
||
55 | } |
||
56 | |||
57 | public function withReplace(string $replace): self |
||
58 | { |
||
59 | $self = clone $this; |
||
60 | $self->replace = $replace; |
||
61 | |||
62 | return $self; |
||
63 | } |
||
64 | |||
65 | public function getEmptyString(): string |
||
66 | { |
||
67 | return $this->emptyString; |
||
68 | } |
||
69 | |||
70 | public function setEmptyString(string $emptyString): self |
||
76 | } |
||
77 | } |
||
78 |