Completed
Pull Request — master (#15)
by Vytautas
10:02
created

ZfcUserProviderFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Svycka\Settings\Provider\Factory;
4
5
use Interop\Container\ContainerInterface;
6
use Svycka\Settings\Provider\ZfcUserProvider;
7
use Zend\Authentication\AuthenticationService;
8
9
/**
10
 * @author Vytautas Stankus <[email protected]>
11
 * @license MIT
12
 */
13
class ZfcUserProviderFactory
14
{
15
    /**
16
     * Create service
17
     *
18
     * @param ContainerInterface $container
19
     *
20
     * @return ZfcUserProvider
21
     */
22 1
    public function __invoke(ContainerInterface $container)
23
    {
24
        /** @var AuthenticationService $authenticationService */
25 1
        $authenticationService = $container->get('zfcuser_auth_service');
26
27 1
        return new ZfcUserProvider($authenticationService);
28
    }
29
}
30