Conditions | 1 |
Paths | 1 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function createService(ServiceLocatorInterface $serviceLocator) |
||
26 | { |
||
27 | /** @var DataMapperManager $dataMapperManager */ |
||
28 | $dataMapperManager = $serviceLocator->get(DataMapperManager::class); |
||
29 | |||
30 | $password = $serviceLocator->get('Thorr\OAuth2\DefaultPasswordInterface'); |
||
31 | |||
32 | /** @var ModuleOptions $moduleOptions */ |
||
33 | $moduleOptions = $serviceLocator->get(ModuleOptions::class); |
||
34 | |||
35 | $adapter = new DataMapperAdapter($dataMapperManager, $password); |
||
36 | $adapter->setUserClass($moduleOptions->getUserEntityClassName()); |
||
37 | |||
38 | return $adapter; |
||
39 | } |
||
40 | } |
||
41 |