@@ -238,6 +238,9 @@ |
||
238 | 238 | } |
239 | 239 | } |
240 | 240 | |
241 | + /** |
|
242 | + * @param string $provider_id |
|
243 | + */ |
|
241 | 244 | private function returnToCallbackUrl($provider_id) { |
242 | 245 | // get the stored callback url |
243 | 246 | $callback_url = $this->hybridAuth->storage()->get( "hauth_session.$provider_id.hauth_return_to" ); |
@@ -2,14 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Azine\HybridAuthBundle\Controller; |
4 | 4 | |
5 | -use Symfony\Component\HttpFoundation\ParameterBag; |
|
6 | - |
|
7 | -use Symfony\Component\HttpFoundation\RedirectResponse; |
|
8 | - |
|
9 | -use Symfony\Component\HttpFoundation\Response; |
|
10 | - |
|
11 | -use Symfony\Component\HttpFoundation\Request; |
|
12 | - |
|
5 | +use Symfony\Component\HttpFoundation\ParameterBag; |
|
6 | +use Symfony\Component\HttpFoundation\RedirectResponse; |
|
7 | +use Symfony\Component\HttpFoundation\Response; |
|
8 | +use Symfony\Component\HttpFoundation\Request; |
|
13 | 9 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
14 | 10 | |
15 | 11 | class HybridEndPointController extends Controller { |
@@ -37,6 +37,9 @@ |
||
37 | 37 | |
38 | 38 | private $debugMsg = ''; |
39 | 39 | |
40 | + /** |
|
41 | + * @param string[] $matchList |
|
42 | + */ |
|
40 | 43 | public function __construct($femaleNames=null, $malesNames=null, $merge = false, $matchList = null){ |
41 | 44 | // Use the double_metaphone module if it's available, or fall back to the |
42 | 45 | // standard metaphone() PHP call if not |
@@ -1,8 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Azine\HybridAuthBundle\Services; |
3 | 3 | |
4 | -use Azine\HybridAuthBundle\Entity\UserContact; |
|
5 | - |
|
6 | 4 | /** |
7 | 5 | * https://github.com/petewarden/genderfromname/blob/master/genderfromname.php |
8 | 6 |
@@ -2,7 +2,6 @@ |
||
2 | 2 | namespace Azine\HybridAuthBundle\Services; |
3 | 3 | |
4 | 4 | use Azine\HybridAuthBundle\Entity\UserContact; |
5 | - |
|
6 | 5 | use Symfony\Component\HttpFoundation\Session\Session; |
7 | 6 | |
8 | 7 | class AzineMergedBusinessNetworksProvider { |
@@ -24,9 +24,9 @@ |
||
24 | 24 | /** |
25 | 25 | * Guess the gender for a given firstname. The guesser will return an array with |
26 | 26 | * |
27 | - * @param \string $firstName |
|
27 | + * @param string $firstName |
|
28 | 28 | * @param int $looseness |
29 | - * @return \string sex => m | f |
|
29 | + * @return string sex => m | f |
|
30 | 30 | */ |
31 | 31 | public function gender($firstName, $looseness=1); |
32 | 32 | } |
33 | 33 | \ No newline at end of file |
@@ -1,14 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Azine\HybridAuthBundle\Services; |
3 | 3 | |
4 | -use Azine\HybridAuthBundle\Entity\UserContact; |
|
5 | - |
|
6 | -use Symfony\Component\HttpFoundation\Session\Session; |
|
7 | - |
|
8 | -use Azine\HybridAuthBundle\DependencyInjection\AzineHybridAuthExtension; |
|
9 | - |
|
10 | -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
|
11 | - |
|
12 | 4 | interface GenderGuesser { |
13 | 5 | |
14 | 6 | /** |
@@ -1,7 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | namespace Azine\HybridAuthBundle\Services; |
3 | 3 | |
4 | -use Azine\HybridAuthBundle\Entity\UserContact; |
|
5 | 4 | use Symfony\Bundle\FrameworkBundle\Tests\TestCase; |
6 | 5 | |
7 | 6 | class AzineGenderGuesserTest extends TestCase { |
@@ -59,6 +59,9 @@ |
||
59 | 59 | * @param string | null $email |
60 | 60 | * @param string | null $headline |
61 | 61 | * @param array | null $tags array of strings |
62 | + * @param string $gender |
|
63 | + * @param string $firstName |
|
64 | + * @param string $lastName |
|
62 | 65 | */ |
63 | 66 | public function __construct($provider, |
64 | 67 | $gender = null, |
@@ -2,13 +2,11 @@ |
||
2 | 2 | namespace Azine\HybridAuthBundle\Services; |
3 | 3 | |
4 | 4 | use Azine\HybridAuthBundle\DependencyInjection\AzineHybridAuthExtension; |
5 | - |
|
6 | 5 | use Azine\HybridAuthBundle\Entity\HybridAuthSessionData; |
7 | 6 | use Doctrine\Common\Persistence\ObjectManager; |
8 | 7 | use Symfony\Component\HttpFoundation\Cookie; |
9 | 8 | use Symfony\Component\HttpFoundation\Request; |
10 | 9 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
11 | -use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; |
|
12 | 10 | use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
13 | 11 | use Symfony\Component\Security\Core\User\UserInterface; |
14 | 12 |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | * @param ObjectManager $manager |
63 | 63 | * @param array $config |
64 | 64 | * @param bool $storeForUser |
65 | - * @param $storeAsCookie |
|
66 | - * @param $expiresInDays |
|
65 | + * @param boolean $storeAsCookie |
|
66 | + * @param integer $expiresInDays |
|
67 | 67 | */ |
68 | 68 | public function __construct(UrlGeneratorInterface $router, TokenStorageInterface $tokenStorage, ObjectManager $manager, $config, $storeForUser, $storeAsCookie, $expiresInDays){ |
69 | 69 | $base_url = $router->generate($config[AzineHybridAuthExtension::ENDPOINT_ROUTE], array(), UrlGeneratorInterface::ABSOLUTE_URL); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | * HybridAuthSessions will be restored from DB and/or cookies, according to the bundle configuration. |
86 | 86 | * |
87 | 87 | * @param $cookieSessionData |
88 | - * @param $provider |
|
88 | + * @param string $provider |
|
89 | 89 | * @return \Hybrid_Auth |
90 | 90 | */ |
91 | 91 | public function getInstance($cookieSessionData, $provider){ |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | * @param $authSessionData |
204 | 204 | * @param string $provider_id |
205 | 205 | * @param boolean $require_login |
206 | - * @return \Hybrid_Provider_Model |
|
206 | + * @return \Hybrid_Provider_Adapter |
|
207 | 207 | */ |
208 | 208 | public function getProvider($authSessionData, $provider_id, $require_login = true){ |
209 | 209 | $adapter = $this->getInstance($authSessionData, $provider_id)->getAdapter($provider_id); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | |
229 | 229 | /** |
230 | 230 | * Get the Xing Adapter |
231 | - * @return \Hybrid_Providers_XING |
|
231 | + * @return \Hybrid_Provider_Adapter |
|
232 | 232 | */ |
233 | 233 | public function getXing(){ |
234 | 234 | return $this->getProvider(null, "xing"); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | /** |
238 | 238 | * Get the Xing api (OAuthClient) |
239 | 239 | * |
240 | - * @return \OAuth1Client |
|
240 | + * @return \stdClass |
|
241 | 241 | */ |
242 | 242 | public function getXingApi(){ |
243 | 243 | return $this->getXing()->api(); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | /** |
247 | 247 | * Get the LinkedIn Adapter |
248 | 248 | * |
249 | - * @return \Hybrid_Providers_LinkedIn |
|
249 | + * @return \Hybrid_Provider_Adapter |
|
250 | 250 | */ |
251 | 251 | public function getLinkedIn(){ |
252 | 252 | return $this->getProvider(null, "linkedin"); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | /** |
256 | 256 | * Get the LinkedIn api (LinkedIn PHP-client) |
257 | 257 | * |
258 | - * @return \LinkedIn |
|
258 | + * @return \stdClass |
|
259 | 259 | */ |
260 | 260 | public function getLinkedInApi(){ |
261 | 261 | return $this->getLinkedIn()->api(); |
@@ -6,11 +6,8 @@ |
||
6 | 6 | use Azine\HybridAuthBundle\Services\AzineHybridAuth; |
7 | 7 | use Azine\HybridAuthBundle\Services\AzineMergedBusinessNetworksProvider; |
8 | 8 | use Symfony\Component\HttpFoundation\RedirectResponse; |
9 | - |
|
10 | 9 | use Symfony\Component\HttpFoundation\JsonResponse; |
11 | - |
|
12 | 10 | use Symfony\Component\HttpFoundation\Request; |
13 | - |
|
14 | 11 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
15 | 12 | |
16 | 13 | class AzineHybridAuthJsonController extends Controller { |