| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 17 | 
| Code Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 46 | public function createDateTimeZone(string $spec): \DateTimeZone  | 
            ||
| 47 |     { | 
            ||
| 48 |         try { | 
            ||
| 49 | /** @var \DateTimeZone $dateTimeZone */  | 
            ||
| 50 | /** @noinspection PhpUnnecessaryLocalVariableInspection */  | 
            ||
| 51 | /** @noinspection OneTimeUseVariablesInspection */  | 
            ||
| 52 | $dateTimeZone = new $this->dateTimeZoneClassName($spec);  | 
            ||
| 53 | return $dateTimeZone;  | 
            ||
| 54 |         } catch (\Exception $e) { | 
            ||
| 55 | throw new DateTimeZoneFactoryException(  | 
            ||
| 56 | sprintf(  | 
            ||
| 57 | 'Failed to create a valid \DateTimeZone instance using \'%s\': %s',  | 
            ||
| 58 | $spec,  | 
            ||
| 59 | $e->getMessage()  | 
            ||
| 60 | ),  | 
            ||
| 61 | $e->getCode(),  | 
            ||
| 62 | $e  | 
            ||
| 63 | );  | 
            ||
| 67 |