Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Oct 31, 2014
1 parent ab26212 commit 9e15c22
Show file tree
Hide file tree
Showing 25 changed files with 73 additions and 85 deletions.
1 change: 0 additions & 1 deletion Command/CleanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace FOS\OAuthServerBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use FOS\OAuthServerBundle\Model\TokenManagerInterface;
Expand Down
6 changes: 2 additions & 4 deletions Controller/AuthorizeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
use FOS\OAuthServerBundle\Form\Handler\AuthorizeFormHandler;
use OAuth2\OAuth2;
use OAuth2\OAuth2ServerException;
use OAuth2\OAuth2RedirectException;
use Symfony\Component\DependencyInjection\ContainerAware;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Symfony\Component\Security\Core\User\UserInterface;
Expand Down Expand Up @@ -81,7 +79,7 @@ public function authorizeAction(Request $request)
}

/**
* @param UserInterface $user
* @param UserInterface $user
* @param AuthorizeFormHandler $formHandler
*
* @return Response
Expand Down Expand Up @@ -115,7 +113,7 @@ protected function processSuccess(UserInterface $user, AuthorizeFormHandler $for
/**
* Generate the redirection url when the authorize is completed
*
* @param \FOS\OAuthServerBundle\Model\UserInterface $user
* @param \FOS\OAuthServerBundle\Model\UserInterface $user
* @return string
*/
protected function getRedirectionUrl(UserInterface $user)
Expand Down
2 changes: 1 addition & 1 deletion Controller/TokenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function __construct(OAuth2 $server)
}

/**
* @param Request $request
* @param Request $request
* @return type
*/
public function tokenAction(Request $request)
Expand Down
1 change: 0 additions & 1 deletion DependencyInjection/FOSOAuthServerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace FOS\OAuthServerBundle\DependencyInjection;

use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down
1 change: 0 additions & 1 deletion Document/TokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public function getClass()
return $this->class;
}


/**
* {@inheritdoc}
*/
Expand Down
4 changes: 2 additions & 2 deletions Entity/AuthCodeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class AuthCodeManager extends BaseAuthCodeManager

/**
* @param \Doctrine\ORM\EntityManager $em
* @param string $class
* @param string $class
*/
public function __construct(EntityManager $em, $class)
{
Expand Down Expand Up @@ -80,7 +80,7 @@ public function deleteAuthCode(AuthCodeInterface $authCode)
/**
* {@inheritdoc}
*/
function deleteExpired()
public function deleteExpired()
{
$qb = $this->repository->createQueryBuilder('a');
$qb
Expand Down
2 changes: 1 addition & 1 deletion Entity/TokenManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function deleteToken(TokenInterface $token)
/**
* {@inheritdoc}
*/
function deleteExpired()
public function deleteExpired()
{
$qb = $this->repository->createQueryBuilder('t');
$qb
Expand Down
2 changes: 1 addition & 1 deletion Form/Model/Authorize.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Authorize
public $scope;

/**
* @param bool $accepted
* @param bool $accepted
* @param array $query
*/
public function __construct($accepted, array $query = array())
Expand Down
2 changes: 1 addition & 1 deletion Model/AuthCodeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ interface AuthCodeInterface extends TokenInterface, IOAuth2AuthCode
/**
* @param string $redirectUri
*/
function setRedirectUri($redirectUri);
public function setRedirectUri($redirectUri);
}
16 changes: 8 additions & 8 deletions Model/AuthCodeManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,49 +21,49 @@ interface AuthCodeManagerInterface
*
* @return AuthCodeInterface
*/
function createAuthCode();
public function createAuthCode();

/**
* Return the class name.
*
* @return string
*/
function getClass();
public function getClass();

/**
* Retrieve an auth code using a set of criteria.
*
* @param array $criteria
* @param AuthCodeInterface|null
*/
function findAuthCodeBy(array $criteria);
public function findAuthCodeBy(array $criteria);

/**
* Retrieve an auth code by its token.
*
* @param string $token
* @param AuthCodeInterface|null
*/
function findAuthCodeByToken($token);
public function findAuthCodeByToken($token);

/**
* Update a given auth code.
*
* @param AuthCodeInterface $authCode
*/
function updateAuthCode(AuthCodeInterface $authCode);
public function updateAuthCode(AuthCodeInterface $authCode);

/**
* Delete a given auth code.
*
* @param AuthCodeInterface $authCode
*/
function deleteAuthCode(AuthCodeInterface $authCode);
public function deleteAuthCode(AuthCodeInterface $authCode);

/**
* Delete expired auth codes.
*
* @return int The number of auth codes deleted.
* @return int The number of auth codes deleted.
*/
function deleteExpired();
public function deleteExpired();
}
16 changes: 8 additions & 8 deletions Model/ClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,41 +18,41 @@ interface ClientInterface extends IOAuth2Client
/**
* @param string $random
*/
function setRandomId($random);
public function setRandomId($random);

/**
* @return string
*/
function getRandomId();
public function getRandomId();

/**
* @param string $secret
*/
function setSecret($secret);
public function setSecret($secret);

/**
* @param $secret
* @return Boolean
*/
function checkSecret($secret);
public function checkSecret($secret);

/**
* @return string
*/
function getSecret();
public function getSecret();

/**
* @param array $redirectUris
*/
function setRedirectUris(array $redirectUris);
public function setRedirectUris(array $redirectUris);

/**
* @param array $grantTypes
*/
function setAllowedGrantTypes(array $grantTypes);
public function setAllowedGrantTypes(array $grantTypes);

/**
* @return array
*/
function getAllowedGrantTypes();
public function getAllowedGrantTypes();
}
12 changes: 6 additions & 6 deletions Model/ClientManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ interface ClientManagerInterface
/**
* @return ClientInterface
*/
function createClient();
public function createClient();

/**
* @return string
*/
function getClass();
public function getClass();

/**
* @return ClientInterface
*/
function findClientBy(array $criteria);
public function findClientBy(array $criteria);

/**
* @return ClientInterface
*/
function findClientByPublicId($publicId);
public function findClientByPublicId($publicId);

/**
* @param ClientInterface
*/
function updateClient(ClientInterface $client);
public function updateClient(ClientInterface $client);

/**
* @param ClientInterface
*/
function deleteClient(ClientInterface $client);
public function deleteClient(ClientInterface $client);
}
14 changes: 7 additions & 7 deletions Model/TokenInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@ interface TokenInterface extends IOAuth2Token
/**
* @param int $timestamp
*/
function setExpiresAt($timestamp);
public function setExpiresAt($timestamp);

/**
* @return int
*/
function getExpiresAt();
public function getExpiresAt();

/**
* @param string $token
*/
function setToken($token);
public function setToken($token);

/**
* @param string $scope
*/
function setScope($scope);
public function setScope($scope);

/**
* @param UserInterface $user
*/
function setUser(UserInterface $user);
public function setUser(UserInterface $user);

/**
* @return UserInterface
*/
function getUser();
public function getUser();

/**
* @param ClientInterface $client
*/
function setClient(ClientInterface $client);
public function setClient(ClientInterface $client);
}
22 changes: 10 additions & 12 deletions Model/TokenManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,58 +11,56 @@

namespace FOS\OAuthServerBundle\Model;

use FOS\OAuthServerBundle\Model\TokenInterface;

interface TokenManagerInterface
{
/**
* Create a new TokenInterface.
*
* @return TokenInterface
*/
function createToken();
public function createToken();

/**
* Return the class name of the Token.
*
* @return string
*/
function getClass();
public function getClass();

/**
* Retrieve a token using a set of criteria.
*
* @param array $criteria
* @param array $criteria
* @return TokenInterface|null
*/
function findTokenBy(array $criteria);
public function findTokenBy(array $criteria);

/**
* Retrieve a token (object) by its token string.
*
* @param string $token A token.
* @param string $token A token.
* @return TokenInterface|null
*/
function findTokenByToken($token);
public function findTokenByToken($token);

/**
* Save or update a given token.
*
* @param TokenInterface $token The token to save or update.
*/
function updateToken(TokenInterface $token);
public function updateToken(TokenInterface $token);

/**
* Delete a given token.
*
* @param TokenInterface $token The token to delete.
*/
function deleteToken(TokenInterface $token);
public function deleteToken(TokenInterface $token);

/**
* Delete expired tokens.
*
* @return int The number of tokens deleted.
* @return int The number of tokens deleted.
*/
function deleteExpired();
public function deleteExpired();
}
2 changes: 1 addition & 1 deletion Resources/config/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parameter key="fos_oauth_server.security.authentication.listener.class">FOS\OAuthServerBundle\Security\Firewall\OAuthListener</parameter>
<parameter key="fos_oauth_server.security.entry_point.class">FOS\OAuthServerBundle\Security\EntryPoint\OAuthEntryPoint</parameter>
</parameters>

<services>
<service id="fos_oauth_server.security.authentication.provider" class="%fos_oauth_server.security.authentication.provider.class%" public="false">
<argument /> <!-- user provider -->
Expand Down
Loading

0 comments on commit 9e15c22

Please sign in to comment.