Fix CS lib/classes

This commit is contained in:
Romain Neutron
2013-01-29 16:39:02 +01:00
parent 53206af159
commit 4414892b91
108 changed files with 178 additions and 249 deletions

View File

@@ -176,7 +176,7 @@ class API_OAuth2_Account
*/
public function get_token()
{
if ( ! $this->token) {
if (! $this->token) {
try {
$this->token = new API_OAuth2_Token($this->app['phraseanet.appbox'], $this);
} catch (Exception_NotFound $e) {
@@ -262,7 +262,7 @@ class API_OAuth2_Account
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$stmt->closeCursor();
if ( ! $row) {
if (! $row) {
throw new Exception_NotFound();
}

View File

@@ -85,7 +85,7 @@ class API_OAuth2_Adapter extends OAuth2
/**
*
* @param Application $app
* @param Application $app
* @return API_OAuth2_Adapter
*/
public function __construct(Application $app)
@@ -418,7 +418,7 @@ class API_OAuth2_Adapter extends OAuth2
* check for valid client_id
* check for valid redirect_uri
*/
if ( ! $input["client_id"]) {
if (! $input["client_id"]) {
if ($input["redirect_uri"])
$this->errorDoRedirectUriCallback(
$input["redirect_uri"], OAUTH2_ERROR_INVALID_CLIENT, NULL, NULL, $input["state"]
@@ -472,7 +472,7 @@ class API_OAuth2_Adapter extends OAuth2
/**
* Check response_type
*/
if ( ! $input["response_type"]) {
if (! $input["response_type"]) {
$this->errorDoRedirectUriCallback($input["redirect_uri"], OAUTH2_ERROR_INVALID_REQUEST, 'Invalid response type.', NULL, $input["state"]);
}

View File

@@ -128,7 +128,7 @@ class API_OAuth2_Application
/**
*
* @param Application $app
* @param Application $app
* @param int $application_id
* @return API_OAuth2_Application
*/
@@ -596,7 +596,7 @@ class API_OAuth2_Application
/**
*
* @param Application $app
* @param Application $app
* @param User_Adapter $user
* @param type $name
* @return API_OAuth2_Application
@@ -644,7 +644,7 @@ class API_OAuth2_Application
/**
*
* @param Application $app
* @param Application $app
* @param type $client_id
* @return API_OAuth2_Application
*/

View File

@@ -135,7 +135,7 @@ class API_OAuth2_AuthCode
/**
*
* @param Application $app
* @param Application $app
* @param API_OAuth2_Account $account
* @return array
*/
@@ -162,7 +162,7 @@ class API_OAuth2_AuthCode
/**
*
* @param Application $app
* @param Application $app
* @param API_OAuth2_Account $account
* @param type $code
* @param int $expires

View File

@@ -61,7 +61,7 @@ class API_OAuth2_RefreshToken
*/
public function get_account()
{
if ( ! $this->account) {
if (! $this->account) {
$this->account = new API_OAuth2_Account($this->app, $this->account_id);
}
@@ -96,7 +96,7 @@ class API_OAuth2_RefreshToken
/**
*
* @param Application $app
* @param Application $app
* @param API_OAuth2_Account $account
* @return array
*/
@@ -121,7 +121,7 @@ class API_OAuth2_RefreshToken
/**
*
* @param Application $app
* @param Application $app
* @param API_OAuth2_Account $account
* @param int $expires
* @param type $refresh_token

View File

@@ -83,7 +83,7 @@ class API_V1_Log
/**
*
* @param Application $app
* @param Application $app
* @param Request $request
* @param API_OAuth2_Account $account
*/

View File

@@ -43,7 +43,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* API constructor
*
* @param Application $app The application context
* @param Application $app The application context
* @return API_V1_adapter
*/
public function __construct(Application $app)
@@ -94,7 +94,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* Return an array of key-values informations about scheduler
*
* @param Application $app The silex application
* @param Application $app The silex application
* @return \API_V1_result
*/
public function get_scheduler(Application $app)
@@ -825,7 +825,7 @@ class API_V1_adapter extends API_V1_Abstract
/**
* Search for results
*
* @param Request $request
* @param Request $request
* @return \API_V1_result
*/
public function search(Request $request)
@@ -885,7 +885,7 @@ class API_V1_adapter extends API_V1_Abstract
$options = SearchEngineOptions::fromRequest($this->app, $request);
$offsetStart = (int) ($request->get('offset_start') ? : 0);
$perPage = (int) $request->get('per_page') ? : 10;
$perPage = (int) $request->get('per_page') ? : 10;
$query = (string) $request->request->get('query');