@@ -20,15 +20,15 @@ |
||
20 | 20 | */ |
21 | 21 | class AssertionManagerFactory implements FactoryInterface |
22 | 22 | { |
23 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
24 | - $configContainer = $container->get('Config'); |
|
25 | - $configArray = isset($configContainer['acl']['assertions']) |
|
26 | - ? $configContainer['acl']['assertions'] |
|
27 | - : array(); |
|
23 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
24 | + $configContainer = $container->get('Config'); |
|
25 | + $configArray = isset($configContainer['acl']['assertions']) |
|
26 | + ? $configContainer['acl']['assertions'] |
|
27 | + : array(); |
|
28 | 28 | |
29 | - $manager = new AssertionManager($container, $configArray); |
|
29 | + $manager = new AssertionManager($container, $configArray); |
|
30 | 30 | |
31 | - $manager->configure(['shared_by_default'=>false]); |
|
32 | - return $manager; |
|
33 | - } |
|
31 | + $manager->configure(['shared_by_default'=>false]); |
|
32 | + return $manager; |
|
33 | + } |
|
34 | 34 | } |
@@ -20,13 +20,13 @@ |
||
20 | 20 | */ |
21 | 21 | class AssertionManagerFactory implements FactoryInterface |
22 | 22 | { |
23 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) { |
|
23 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { |
|
24 | 24 | $configContainer = $container->get('Config'); |
25 | 25 | $configArray = isset($configContainer['acl']['assertions']) |
26 | 26 | ? $configContainer['acl']['assertions'] |
27 | 27 | : array(); |
28 | 28 | |
29 | - $manager = new AssertionManager($container, $configArray); |
|
29 | + $manager = new AssertionManager($container, $configArray); |
|
30 | 30 | |
31 | 31 | $manager->configure(['shared_by_default'=>false]); |
32 | 32 | return $manager; |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | */ |
26 | 26 | class AssertionManager extends AbstractPluginManager |
27 | 27 | { |
28 | - /** |
|
29 | - * @var ContainerInterface |
|
30 | - */ |
|
31 | - protected $container; |
|
28 | + /** |
|
29 | + * @var ContainerInterface |
|
30 | + */ |
|
31 | + protected $container; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Creates an instance. |
@@ -58,20 +58,20 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public function injectEventManager($assertion, $serviceLocator) |
60 | 60 | { |
61 | - //@TODO: [ZF3] check if ACL working properly |
|
61 | + //@TODO: [ZF3] check if ACL working properly |
|
62 | 62 | /* @var $serviceLocator AssertionManager */ |
63 | 63 | |
64 | 64 | if (!$assertion instanceof EventManagerAwareInterface) { |
65 | 65 | return; |
66 | 66 | } |
67 | 67 | /* @var EventManager $events */ |
68 | - $container = $this->container; |
|
68 | + $container = $this->container; |
|
69 | 69 | $events = $assertion->getEventManager(); |
70 | 70 | if (!$events instanceof EventManagerInterface) { |
71 | 71 | $events = $container->get('EventManager'); /* @var $events \Zend\EventManager\EventManagerInterface */ |
72 | 72 | $assertion->setEventManager($events); |
73 | 73 | } else { |
74 | - //@TODO: [ZF3] setSharedManager method now is removed |
|
74 | + //@TODO: [ZF3] setSharedManager method now is removed |
|
75 | 75 | //$sharedEvents = $container->get('SharedEventManager'); /* @var $sharedEvents \Zend\EventManager\SharedEventManagerInterface */ |
76 | 76 | //$events->setSharedManager($sharedEvents); |
77 | 77 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | /* @var $events \Zend\EventManager\SharedEventManager */ |
44 | 44 | $events->attach('Zend\Mvc\Application', MvcEvent::EVENT_BOOTSTRAP, array($this, 'onBootstrap'), $priority); |
45 | - $this->listener = [$this,'onBootstrap']; |
|
45 | + $this->listener = [$this, 'onBootstrap']; |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function detachShared(SharedEventManagerInterface $events) |
55 | 55 | { |
56 | - if ($events->detach($this->listener,'Zend\Mvc\Application')) { |
|
56 | + if ($events->detach($this->listener, 'Zend\Mvc\Application')) { |
|
57 | 57 | $this->listener = null; |
58 | 58 | } |
59 | 59 | return $this; |
@@ -25,9 +25,9 @@ |
||
25 | 25 | */ |
26 | 26 | class SocialProfilesUnconfiguredErrorListener extends AbstractListenerAggregate |
27 | 27 | { |
28 | - public function attach(EventManagerInterface $events, $priority=1) |
|
28 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
29 | 29 | { |
30 | - $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [ $this, 'onDispatchError']); |
|
30 | + $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'onDispatchError']); |
|
31 | 31 | |
32 | 32 | return $this; |
33 | 33 | } |
@@ -51,8 +51,8 @@ |
||
51 | 51 | */ |
52 | 52 | public function __invoke(AuthEvent $event) |
53 | 53 | { |
54 | - /* @TODO: [ZF3] $e->getUser() is not worked anymore we should using $e->getTarget()->getUser() */ |
|
55 | - $target = $event->getTarget(); |
|
54 | + /* @TODO: [ZF3] $e->getUser() is not worked anymore we should using $e->getTarget()->getUser() */ |
|
55 | + $target = $event->getTarget(); |
|
56 | 56 | $siteName = $this->coreOptions->getSiteName(); |
57 | 57 | /* @var \Auth\Entity\User $user */ |
58 | 58 | $user = $target->getUser(); |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | public function __construct($options, $mailService, $coreOptions) |
41 | 41 | { |
42 | - $this->options=$options; |
|
43 | - $this->mailService=$mailService; |
|
42 | + $this->options = $options; |
|
43 | + $this->mailService = $mailService; |
|
44 | 44 | $this->coreOptions = $coreOptions; |
45 | 45 | } |
46 | 46 | |
@@ -52,16 +52,16 @@ discard block |
||
52 | 52 | public function __invoke(AuthEvent $event) |
53 | 53 | { |
54 | 54 | /* @TODO: [ZF3] $e->getUser() is not worked anymore we should using $e->getTarget()->getUser() */ |
55 | - $target = $event->getTarget(); |
|
56 | - $siteName = $this->coreOptions->getSiteName(); |
|
55 | + $target = $event->getTarget(); |
|
56 | + $siteName = $this->coreOptions->getSiteName(); |
|
57 | 57 | /* @var \Auth\Entity\User $user */ |
58 | 58 | $user = $target->getUser(); |
59 | 59 | $userEmail = $user->getInfo()->getEmail(); |
60 | 60 | $userName = $user->getInfo()->getDisplayName(false); |
61 | 61 | $resetLink = $target->getResetLink(); |
62 | 62 | |
63 | - $fromEmail = $this->options->getFromEmail(); |
|
64 | - $fromName = $this->options->getFromName(); |
|
63 | + $fromEmail = $this->options->getFromEmail(); |
|
64 | + $fromName = $this->options->getFromName(); |
|
65 | 65 | |
66 | 66 | |
67 | 67 | $mail = $this->mailService->get('htmltemplate'); |
@@ -22,15 +22,15 @@ |
||
22 | 22 | */ |
23 | 23 | class ModuleOptionsFactory implements FactoryInterface |
24 | 24 | { |
25 | - /** |
|
26 | - * Create an ModuleOptions options |
|
27 | - * |
|
28 | - * @param ContainerInterface $container |
|
29 | - * @param string $requestedName |
|
30 | - * @param array|null $options |
|
31 | - * |
|
32 | - * @return ModuleOptions |
|
33 | - */ |
|
25 | + /** |
|
26 | + * Create an ModuleOptions options |
|
27 | + * |
|
28 | + * @param ContainerInterface $container |
|
29 | + * @param string $requestedName |
|
30 | + * @param array|null $options |
|
31 | + * |
|
32 | + * @return ModuleOptions |
|
33 | + */ |
|
34 | 34 | public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
35 | 35 | { |
36 | 36 | $config = $container->get('Config'); |
@@ -23,21 +23,21 @@ |
||
23 | 23 | class ExternalApplicationAdapterFactory implements FactoryInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
27 | - { |
|
28 | - $repository = $container->get('repositories')->get('Auth/User'); |
|
29 | - $adapter = new ExternalApplication($repository); |
|
30 | - $adapter->setServiceLocator($container); |
|
31 | - $config = $container->get('Config'); |
|
32 | - if (isset($config['Auth']['external_applications']) && is_array($config['Auth']['external_applications'])) { |
|
33 | - $adapter->setApplicationKeys($config['Auth']['external_applications']); |
|
34 | - } |
|
26 | + public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
27 | + { |
|
28 | + $repository = $container->get('repositories')->get('Auth/User'); |
|
29 | + $adapter = new ExternalApplication($repository); |
|
30 | + $adapter->setServiceLocator($container); |
|
31 | + $config = $container->get('Config'); |
|
32 | + if (isset($config['Auth']['external_applications']) && is_array($config['Auth']['external_applications'])) { |
|
33 | + $adapter->setApplicationKeys($config['Auth']['external_applications']); |
|
34 | + } |
|
35 | 35 | |
36 | - return $adapter; |
|
37 | - } |
|
36 | + return $adapter; |
|
37 | + } |
|
38 | 38 | |
39 | 39 | |
40 | - /** |
|
40 | + /** |
|
41 | 41 | * Creates an instance of \Auth\Adapter\ExternalApplication |
42 | 42 | * |
43 | 43 | * - injects the UserRepository fetched from the service manager. |
@@ -23,7 +23,7 @@ |
||
23 | 23 | class ExternalApplicationAdapterFactory implements FactoryInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
26 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
27 | 27 | { |
28 | 28 | $repository = $container->get('repositories')->get('Auth/User'); |
29 | 29 | $adapter = new ExternalApplication($repository); |
@@ -59,8 +59,8 @@ |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
62 | - $externalAdapter = $container->get('ExternalApplicationAdapter'); |
|
63 | - $repositories = $container->get('repositories'); |
|
62 | + $externalAdapter = $container->get('ExternalApplicationAdapter'); |
|
63 | + $repositories = $container->get('repositories'); |
|
64 | 64 | $controller = new IndexController($auth, $logger, $userLoginAdapter,$locale,$viewHelperManager,$forms, $options,$hybridAuthAdapter,$externalAdapter,$repositories); |
65 | 65 | return $controller; |
66 | 66 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | $hybridAuthAdapter = $container->get('HybridAuthAdapter'); |
62 | 62 | $externalAdapter = $container->get('ExternalApplicationAdapter'); |
63 | 63 | $repositories = $container->get('repositories'); |
64 | - $controller = new IndexController($auth, $logger, $userLoginAdapter,$locale,$viewHelperManager,$forms, $options,$hybridAuthAdapter,$externalAdapter,$repositories); |
|
64 | + $controller = new IndexController($auth, $logger, $userLoginAdapter, $locale, $viewHelperManager, $forms, $options, $hybridAuthAdapter, $externalAdapter, $repositories); |
|
65 | 65 | return $controller; |
66 | 66 | } |
67 | 67 | /** |
@@ -30,8 +30,8 @@ |
||
30 | 30 | { |
31 | 31 | /* @var $users \Auth\Repository\User */ |
32 | 32 | $users = $container->get('repositories')->get('Auth/User'); |
33 | - $formManager = $container->get('forms'); |
|
34 | - $viewHelper = $container->get('ViewHelperManager'); |
|
33 | + $formManager = $container->get('forms'); |
|
34 | + $viewHelper = $container->get('ViewHelperManager'); |
|
35 | 35 | return new UsersController($users,$formManager,$viewHelper); |
36 | 36 | } |
37 | 37 | } |
@@ -32,6 +32,6 @@ |
||
32 | 32 | $users = $container->get('repositories')->get('Auth/User'); |
33 | 33 | $formManager = $container->get('forms'); |
34 | 34 | $viewHelper = $container->get('ViewHelperManager'); |
35 | - return new UsersController($users,$formManager,$viewHelper); |
|
35 | + return new UsersController($users, $formManager, $viewHelper); |
|
36 | 36 | } |
37 | 37 | } |