Skip to content

Commit 39f28f8

Browse files
committed
Minor: Format code - refs BT#21881
1 parent 2b0c9d3 commit 39f28f8

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/CoreBundle/Repository/ExtraFieldValuesRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ public function findLegalAcceptByItemId($itemId)
145145

146146
/**
147147
* @return ExtraFieldValues|array<ExtraFieldValues>|null
148+
*
148149
* @throws NonUniqueResultException
149150
*/
150151
public function findByVariableAndValue(

src/CoreBundle/Security/Authenticator/OAuth2/FacebookAuthenticator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
use Chamilo\CoreBundle\ServiceHelper\AuthenticationConfigHelper;
1212
use Cocur\Slugify\SlugifyInterface;
1313
use KnpU\OAuth2ClientBundle\Client\ClientRegistry;
14-
use KnpU\OAuth2ClientBundle\Client\OAuth2ClientInterface;
1514
use League\OAuth2\Client\Provider\FacebookUser;
1615
use League\OAuth2\Client\Token\AccessToken;
1716
use Symfony\Component\HttpFoundation\Request;
@@ -52,7 +51,7 @@ protected function userLoader(AccessToken $accessToken): User
5251
$user
5352
->setFirstname($resourceOwner->getFirstName())
5453
->setLastname($resourceOwner->getLastName())
55-
//->setLocale($resourceOwner->getLocale())
54+
// ->setLocale($resourceOwner->getLocale())
5655
->setEmail($resourceOwner->getEmail())
5756
->setUsername($this->changeToValidChamiloLogin($resourceOwner->getEmail()))
5857
->setPlainPassword('facebook')

src/CoreBundle/Security/Authenticator/OAuth2/GenericAuthenticator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function userLoader(AccessToken $accessToken): User
9090
$user = (new User())
9191
->setFirstname('OAuth2 User default firstname')
9292
->setLastname('OAuth2 User default firstname')
93-
->setEmail('oauth2user_'.$resourceOwnerId.'@'.(gethostname() or 'localhost'))
93+
->setEmail('oauth2user_'.$resourceOwnerId.'@'.(gethostname() ?: 'localhost'))
9494
->setUsername($username)
9595
->setPlainPassword($username)
9696
->setStatus(STUDENT)
@@ -120,7 +120,7 @@ protected function userLoader(AccessToken $accessToken): User
120120
}
121121

122122
/**
123-
* Set user information from the resource owner's data or the user itself
123+
* Set user information from the resource owner's data or the user itself.
124124
*/
125125
public function saveUserInfo(User $user, array $resourceOwnerData, array $providerParams): void
126126
{

src/CoreBundle/Security/Authenticator/OAuth2/KeycloakAuthenticator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Chamilo\CoreBundle\Security\Authenticator\OAuth2;
88

99
use Chamilo\CoreBundle\Entity\User;
10-
use KnpU\OAuth2ClientBundle\Client\OAuth2ClientInterface;
1110
use League\OAuth2\Client\Token\AccessToken;
1211
use Stevenmaguire\OAuth2\Client\Provider\KeycloakResourceOwner;
1312
use Symfony\Component\HttpFoundation\Request;

0 commit comments

Comments
 (0)