@@ -185,10 +185,10 @@ discard block |
||
| 185 | 185 | } |
| 186 | 186 | |
| 187 | 187 | /** |
| 188 | - * @param null $financeItems |
|
| 189 | - * @param null $equipmentItems |
|
| 190 | - * @param null $workItems |
|
| 191 | - * @param null $otherItems |
|
| 188 | + * @param integer $financeItems |
|
| 189 | + * @param integer $equipmentItems |
|
| 190 | + * @param integer $workItems |
|
| 191 | + * @param integer $otherItems |
|
| 192 | 192 | * |
| 193 | 193 | * @return User |
| 194 | 194 | */ |
@@ -230,9 +230,9 @@ discard block |
||
| 230 | 230 | /** |
| 231 | 231 | * Count $keyDreams must be count $dreamContributed |
| 232 | 232 | * |
| 233 | - * @param $itemDreams |
|
| 234 | - * @param array $keyDreams |
|
| 235 | - * @param array $dreamContributed |
|
| 233 | + * @param integer $itemDreams |
|
| 234 | + * @param integer[] $keyDreams |
|
| 235 | + * @param integer[] $dreamContributed |
|
| 236 | 236 | * |
| 237 | 237 | * @return ArrayCollection |
| 238 | 238 | */ |
@@ -39,6 +39,11 @@ discard block |
||
| 39 | 39 | $this->defaultAvatarPath = $defaultAvatarPath; |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | + /** |
|
| 43 | + * @param string $localFileName |
|
| 44 | + * |
|
| 45 | + * @return string |
|
| 46 | + */ |
|
| 42 | 47 | public function getMediaFromRemoteImg($remoteImg, $localFileName) |
| 43 | 48 | { |
| 44 | 49 | $destination = $this->kernelWebDir.'/../web'.$this->uploadDir; |
@@ -77,6 +82,9 @@ discard block |
||
| 77 | 82 | return $media; |
| 78 | 83 | } |
| 79 | 84 | |
| 85 | + /** |
|
| 86 | + * @param string $localImg |
|
| 87 | + */ |
|
| 80 | 88 | private function copyAvatar($remoteImg, $localImg) |
| 81 | 89 | { |
| 82 | 90 | $defaultImg = $this->kernelWebDir.$this->defaultAvatarPath;//'/../web/images/default_avatar.png'; |
@@ -100,6 +108,9 @@ discard block |
||
| 100 | 108 | return true; |
| 101 | 109 | } |
| 102 | 110 | |
| 111 | + /** |
|
| 112 | + * @return string |
|
| 113 | + */ |
|
| 103 | 114 | public function getDefaultAvatar() |
| 104 | 115 | { |
| 105 | 116 | $defaultImg = $this->kernelWebDir.$this->defaultAvatarPath;//'/../web/images/default_avatar.png'; |
@@ -6,9 +6,8 @@ |
||
| 6 | 6 | use Guzzle\Http\Exception\RequestException; |
| 7 | 7 | use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface; |
| 8 | 8 | use JMS\Serializer\Serializer; |
| 9 | -use Symfony\Component\Config\Definition\Exception\Exception; |
|
| 10 | -use Symfony\Component\DependencyInjection\Container, |
|
| 11 | - Symfony\Component\Filesystem\Filesystem; |
|
| 9 | +use Symfony\Component\DependencyInjection\Container; |
|
| 10 | +use Symfony\Component\Filesystem\Filesystem; |
|
| 12 | 11 | use Application\Sonata\MediaBundle\Entity\Media; |
| 13 | 12 | use Geekhub\UserBundle\Entity\User; |
| 14 | 13 | use Symfony\Component\Filesystem\Exception\IOExceptionInterface; |
@@ -2,20 +2,18 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Geekhub\UserBundle\UserProvider; |
| 4 | 4 | |
| 5 | -use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface, |
|
| 6 | - HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface, |
|
| 7 | - HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseClass; |
|
| 5 | +use HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface; |
|
| 6 | +use HWI\Bundle\OAuthBundle\Security\Core\User\OAuthAwareUserProviderInterface; |
|
| 7 | +use HWI\Bundle\OAuthBundle\Security\Core\User\FOSUBUserProvider as BaseClass; |
|
| 8 | 8 | use Symfony\Component\HttpFoundation\Session\Session; |
| 9 | 9 | use Symfony\Component\Security\Core\Exception\LockedException; |
| 10 | -use Symfony\Component\Security\Core\User\UserInterface, |
|
| 11 | - Symfony\Component\Security\Core\User\UserProviderInterface, |
|
| 12 | - Symfony\Component\PropertyAccess\PropertyAccessor; |
|
| 13 | -use Doctrine\DBAL\Types, |
|
| 14 | - Doctrine\DBAL\DBALException; |
|
| 15 | -use Geekhub\UserBundle\UserProvider\FacebookProvider, |
|
| 16 | - Geekhub\UserBundle\UserProvider\VkontakteProvider, |
|
| 17 | - Geekhub\UserBundle\UserProvider\OdnoklassnikiProvider, |
|
| 18 | - Geekhub\UserBundle\Entity\User; |
|
| 10 | +use Symfony\Component\Security\Core\User\UserInterface; |
|
| 11 | +use Symfony\Component\Security\Core\User\UserProviderInterface; |
|
| 12 | +use Symfony\Component\PropertyAccess\PropertyAccessor; |
|
| 13 | +use Geekhub\UserBundle\UserProvider\FacebookProvider; |
|
| 14 | +use Geekhub\UserBundle\UserProvider\VkontakteProvider; |
|
| 15 | +use Geekhub\UserBundle\UserProvider\OdnoklassnikiProvider; |
|
| 16 | +use Geekhub\UserBundle\Entity\User; |
|
| 19 | 17 | |
| 20 | 18 | class DreamUserProvider extends BaseClass implements UserProviderInterface, OAuthAwareUserProviderInterface |
| 21 | 19 | { |
@@ -30,6 +30,9 @@ |
||
| 30 | 30 | return $user; |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | + /** |
|
| 34 | + * @param string $token |
|
| 35 | + */ |
|
| 33 | 36 | private function getFacebookUserInfo($token) |
| 34 | 37 | { |
| 35 | 38 | $client = new Client(); |
@@ -43,6 +43,11 @@ |
||
| 43 | 43 | return $user; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $uid |
|
| 48 | + * @param string $token |
|
| 49 | + * @param string $field |
|
| 50 | + */ |
|
| 46 | 51 | private function vkontakteGetProfileField($uid, $token, $field) |
| 47 | 52 | { |
| 48 | 53 | $client = new Client(); |