| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 6 | public function createService(ServiceLocatorInterface $serviceLocator) |
|
| 28 | { |
||
| 29 | /** @var $serviceLocator FormElementManager */ |
||
| 30 | 6 | $parentLocator = $serviceLocator->getServiceLocator(); |
|
| 31 | 6 | $config = $parentLocator->get('Config')['mpacustomdoctrinehydrator']['formats'][Locale::getDefault()]; |
|
| 32 | |||
| 33 | 6 | $formElement = new DateTime(); |
|
| 34 | 6 | $formElement->setFormat($config['datetime_format']); |
|
| 35 | 6 | $formElement->setAttribute('placeholder', $config['datetime_placeholder']); |
|
| 36 | |||
| 37 | 6 | return $formElement; |
|
| 38 | } |
||
| 39 | } |
||
| 40 |