| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2.004 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | 7 | public function denormalize(string $propertyName): string |
|
| 41 | { |
||
| 42 | 7 | if (isset($this->localStorage[$propertyName]) === false) |
|
| 43 | { |
||
| 44 | 7 | $joinedString = \preg_replace_callback( |
|
| 45 | 7 | '/_(.?)/', |
|
| 46 | 7 | static function (array $matches): string |
|
| 47 | { |
||
| 48 | return \ucfirst((string) $matches[1]); |
||
| 49 | 7 | }, |
|
| 50 | 7 | $propertyName |
|
| 51 | ); |
||
| 52 | |||
| 53 | 7 | $this->localStorage[$propertyName] = \lcfirst((string) $joinedString); |
|
| 54 | } |
||
| 55 | |||
| 56 | 7 | return $this->localStorage[$propertyName]; |
|
| 57 | } |
||
| 59 |