Completed
Branch master (d879ff)
by Andreas
15:31
created
Module.php 2 patches
Unused Use Statements   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,10 +32,9 @@
 block discarded – undo
32 32
 
33 33
 namespace OrgHeiglHybridAuth;
34 34
 
35
-use Zend\ModuleManager\ModuleManager,
36
-    Zend\EventManager\StaticEventManager,
37
-    Zend\Mvc\ModuleRouteListener;
38
-use OrgHeiglHybridAuth\View\Helper\HybridAuth as HybridAuthViewManager;
35
+use Zend\ModuleManager\ModuleManager;
36
+use Zend\EventManager\StaticEventManager;
37
+use Zend\Mvc\ModuleRouteListener;
39 38
     
40 39
 
41 40
 /**
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,9 +75,9 @@  discard block
 block discarded – undo
75 75
     public function onBootstrap($e)
76 76
     {
77 77
     //	$e->getApplication()->getServiceManager()->get('translator');
78
-    	$eventManager        = $e->getApplication()->getEventManager();
79
-    	$moduleRouteListener = new ModuleRouteListener();
80
-    	$moduleRouteListener->attach($eventManager);
78
+        $eventManager        = $e->getApplication()->getEventManager();
79
+        $moduleRouteListener = new ModuleRouteListener();
80
+        $moduleRouteListener->attach($eventManager);
81 81
 
82 82
         $servicemanager = $e->getApplication()->getServiceManager();
83 83
         $helperManager  = $servicemanager->get('viewhelpermanager');
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     
91 91
     public function getConfig()
92 92
     {
93
-    	return include __DIR__ . '/config/module.config.php';
93
+        return include __DIR__ . '/config/module.config.php';
94 94
     }
95 95
     
96 96
     public function getAutoloaderConfig()
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/HybridAuthUserWrapper.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,9 +57,8 @@
 block discarded – undo
57 57
     /**
58 58
      * Set the user-object
59 59
      *
60
-     * @param Hybridauth\Entity\Profile $userProfile The userprofile to use
61 60
      *
62
-     * @return HybridAuthUserProxy
61
+     * @return HybridAuthUserWrapper
63 62
      */
64 63
     public function setUser(Profile $user)
65 64
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
 namespace OrgHeiglHybridAuth;
33 33
 
34 34
 use Hybridauth\Entity\Profile;
35
-use OrgHeiglHybridAuth\UserInterface;
36 35
 
37 36
 /**
38 37
  * This class works as proxy to the HybridAuth-User-Object
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/Service/SessionFactory.php 1 patch
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,10 +51,9 @@
 block discarded – undo
51 51
     /**
52 52
      * Create the service using the configuration from the modules config-file
53 53
      *
54
-     * @param ServiceLocator $services The ServiceLocator
55 54
      *
56 55
      * @see \Zend\ServiceManager\FactoryInterface::createService()
57
-     * @return Hybrid_Auth
56
+     * @return SessionContainer
58 57
      */
59 58
     public function createService(ServiceLocatorInterface $serviceLocator)
60 59
     {
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/UserToken.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,6 @@
 block discarded – undo
65 65
     /**
66 66
      * Set the user-object
67 67
      *
68
-     * @param HybridAuthUserWrapper $userProfile The userprofile to use
69 68
      *
70 69
      * @return UserToken
71 70
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
      */
157 157
     public function isAuthenticated()
158 158
     {
159
-        if (! $this->getService()) {
159
+        if (!$this->getService()) {
160 160
             return false;
161 161
         }
162 162
 
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/View/Helper/HybridAuth.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     /**
75 75
      * create an instance of the viewhelper
76 76
      *
77
-     * @param mixed $viewHelperManager
77
+     * @param HelperPluginManager $viewHelperManager
78 78
      */
79 79
     public function __construct(HelperPluginManager $viewHelperManager, MvcEvent $mvcEvent)
80 80
     {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,6 @@
 block discarded – undo
33 33
 use Zend\View\Helper\AbstractHtmlElement as HtmlElement;
34 34
 use Zend\View\HelperPluginManager;
35 35
 use Zend\Mvc\MvcEvent;
36
-
37 36
 use Zend\ServiceManager\ServiceLocatorAwareInterface;
38 37
 use Zend\ServiceManager\ServiceLocatorInterface;
39 38
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                 $config['item'],
140 140
                 sprintf(
141 141
                     $config['link'],
142
-                    (is_string($name)?$name:$backend),
142
+                    (is_string($name) ? $name : $backend),
143 143
                     $link
144 144
                 ),
145 145
                 $config['itemAttribs']
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             ),
155 155
             sprintf(
156 156
                 $config['itemlist'],
157
-                implode("\n",$xhtml),
157
+                implode("\n", $xhtml),
158 158
                 $config['listAttribs']
159 159
             )
160 160
         );
Please login to merge, or discard this patch.
config/autoload/module.orgHeiglHybridAuth.test.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
 return array('OrgHeiglHybridAuth' => array(
34 34
     'hybrid_auth' => array(
35
-       // 'base_url' => 'http://example.com/auth/backend',
35
+        // 'base_url' => 'http://example.com/auth/backend',
36 36
         'providers' => array(
37 37
             'Twitter' => array('enabled' => false, 'keys' => array('key' => '', 'secret' => '')),
38 38
         ),
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/UserWrapperFactory.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
  */
45 45
 class UserWrapperFactory
46 46
 {
47
-   /**
48
-    * Create the user-Proxy according to the given User-Object
49
-    *
50
-    * @return UserInterface
51
-    * @throws \UnexpectedValueException
52
-    */
47
+    /**
48
+     * Create the user-Proxy according to the given User-Object
49
+     *
50
+     * @return UserInterface
51
+     * @throws \UnexpectedValueException
52
+     */
53 53
     public function factory($userObject)
54 54
     {
55 55
         switch (get_class($userObject))
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/Controller/IndexController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
                 throw new \UnexpectedValueException('User is not connected');
122 122
             }
123 123
             $profile = $backend->getUserProfile();
124
-          //  error_log(print_R($this->userWrapperFactory->factory($profile),true));
124
+            //  error_log(print_R($this->userWrapperFactory->factory($profile),true));
125 125
             $this->session->offsetSet('authenticated', $backend->isAuthorized());
126 126
             $this->session->offsetSet('user', $this->userWrapperFactory->factory($profile));
127 127
             $this->session->offsetSet('backend', $provider);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
         try {
119 119
             $backend = $this->authenticator->authenticate($provider);
120
-            if (! $backend->isAuthorized()) {
120
+            if (!$backend->isAuthorized()) {
121 121
                 throw new \UnexpectedValueException('User is not connected');
122 122
             }
123 123
             $profile = $backend->getUserProfile();
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
         $endpoint = new Endpoint();
176 176
         $endpoint->process();
177
-        } catch(\Exception $e) {
177
+        } catch (\Exception $e) {
178 178
             //
179 179
         }
180 180
         return false;
Please login to merge, or discard this patch.
src/OrgHeiglHybridAuth/Service/UserFactory.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $userToken = new UserToken();
74 74
         $userToken->setService($service)
75
-                  ->setUser($user);
75
+                    ->setUser($user);
76 76
 
77 77
         return $userToken;
78 78
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,6 +94,6 @@
 block discarded – undo
94 94
         $uri->setPath($basePath);
95 95
         $uri->setQuery(array());
96 96
         $uri->setFragment('');
97
-        return $uri->getScheme() . '://' . $uri->getHost() . preg_replace('/[\/]+/', '/',  $uri->getPath() . '/' . $route);
97
+        return $uri->getScheme() . '://' . $uri->getHost() . preg_replace('/[\/]+/', '/', $uri->getPath() . '/' . $route);
98 98
     }
99 99
 }
Please login to merge, or discard this patch.