| Total Complexity | 5 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 5 | trait HasNames |
||
| 6 | { |
||
| 7 | // TODO - these methods should be FullName not Name.... keep name untouched |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @property-read $input_name |
||
| 11 | * |
||
| 12 | * @return string |
||
| 13 | */ |
||
| 14 | public function getInputNameAttribute(): string |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | *@property-read $input_dot_name |
||
| 30 | * |
||
| 31 | */ |
||
| 32 | public function getInputDotNameAttribute(): string |
||
| 33 | { |
||
| 34 | return str_replace([ |
||
| 35 | '[]', |
||
| 36 | '[', |
||
| 37 | ']' |
||
| 38 | ], [ |
||
| 39 | '.*', |
||
| 40 | '.', |
||
| 41 | '' |
||
| 42 | ], $this->input_name); |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @property-read $input_dot_name |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public function getInputJsonDotNameAttribute(): string |
||
| 61 | } |
||
| 62 | } |