@@ -3,15 +3,10 @@ |
||
| 3 | 3 | namespace Azine\HybridAuthBundle\Controller; |
| 4 | 4 | |
| 5 | 5 | use Symfony\Component\HttpFoundation\RedirectResponse; |
| 6 | - |
|
| 7 | 6 | use Azine\HybridAuthBundle\Services\AzineHybridAuth; |
| 8 | - |
|
| 9 | 7 | use Azine\HybridAuthBundle\Services\AzineMergedBusinessNetworksProvider; |
| 10 | - |
|
| 11 | 8 | use Symfony\Component\HttpFoundation\JsonResponse; |
| 12 | - |
|
| 13 | 9 | use Symfony\Component\HttpFoundation\Request; |
| 14 | - |
|
| 15 | 10 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 16 | 11 | |
| 17 | 12 | class AzineHybridAuthJsonController extends Controller { |
@@ -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,15 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Azine\HybridAuthBundle\Controller; |
| 4 | 4 | |
| 5 | -use Azine\HybridAuthBundle\Services\AzineHybridAuth; |
|
| 6 | -use Symfony\Component\HttpFoundation\ParameterBag; |
|
| 7 | - |
|
| 8 | -use Symfony\Component\HttpFoundation\RedirectResponse; |
|
| 9 | - |
|
| 10 | -use Symfony\Component\HttpFoundation\Response; |
|
| 11 | - |
|
| 12 | -use Symfony\Component\HttpFoundation\Request; |
|
| 13 | - |
|
| 5 | +use Azine\HybridAuthBundle\Services\AzineHybridAuth; |
|
| 6 | +use Symfony\Component\HttpFoundation\ParameterBag; |
|
| 7 | +use Symfony\Component\HttpFoundation\RedirectResponse; |
|
| 8 | +use Symfony\Component\HttpFoundation\Response; |
|
| 9 | +use Symfony\Component\HttpFoundation\Request; |
|
| 14 | 10 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
| 15 | 11 | |
| 16 | 12 | class HybridEndPointController extends Controller {
|
@@ -43,6 +43,11 @@ |
||
| 43 | 43 | /* For Xing & LinkedIn usually job-title @ main ompany */ |
| 44 | 44 | public $headline = NULL; |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $gender |
|
| 48 | + * @param string $firstName |
|
| 49 | + * @param string $lastName |
|
| 50 | + */ |
|
| 46 | 51 | public function __construct($provider, |
| 47 | 52 | $gender = null, |
| 48 | 53 | $firstName = null, |
@@ -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 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | - * @param $sessionData |
|
| 67 | + * @param string|null $sessionData |
|
| 68 | 68 | */ |
| 69 | 69 | public function storeHybridAuthSessionData($sessionData){ |
| 70 | 70 | // todo implement this! |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @param string $provider_id |
| 92 | 92 | * @param boolean $require_login |
| 93 | - * @return \Hybrid_Provider_Model |
|
| 93 | + * @return \Hybrid_Provider_Adapter |
|
| 94 | 94 | */ |
| 95 | 95 | public function getProvider($provider_id, $require_login = true){ |
| 96 | 96 | $adapter = $this->hybridAuth->getAdapter($provider_id); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | |
| 114 | 114 | /** |
| 115 | 115 | * Get the Xing Adapter |
| 116 | - * @return \Hybrid_Providers_XING |
|
| 116 | + * @return \Hybrid_Provider_Adapter |
|
| 117 | 117 | */ |
| 118 | 118 | public function getXing(){ |
| 119 | 119 | return $this->getProvider("xing"); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | /** |
| 132 | 132 | * Get the LinkedIn Adapter |
| 133 | 133 | * |
| 134 | - * @return \Hybrid_Providers_LinkedIn |
|
| 134 | + * @return \Hybrid_Provider_Adapter |
|
| 135 | 135 | */ |
| 136 | 136 | public function getLinkedIn(){ |
| 137 | 137 | return $this->getProvider("linkedin"); |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | namespace Azine\HybridAuthBundle\Services; |
| 3 | 3 | |
| 4 | 4 | use Azine\HybridAuthBundle\DependencyInjection\AzineHybridAuthExtension; |
| 5 | - |
|
| 6 | 5 | use Doctrine\Common\Persistence\ObjectManager; |
| 7 | 6 | use Symfony\Component\HttpFoundation\Request; |
| 8 | 7 | use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
@@ -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 { |