From 8ab4c38373932a3f40c4810cf88c278a2f478976 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 3 May 2014 22:44:00 -0400 Subject: Remove some warnings for Scrutinizer-ci --- actions/task_assign_color_user.php | 8 ++++++++ actions/task_assign_current_user.php | 16 +++++++++++++++ actions/task_assign_specific_user.php | 8 ++++++++ actions/task_close.php | 8 ++++++++ actions/task_duplicate_another_project.php | 8 ++++++++ controllers/base.php | 32 ++++++++++++++++++++++++++++++ core/session.php | 2 +- locales/es_ES/translations.php | 1 + locales/fr_FR/translations.php | 1 + locales/pl_PL/translations.php | 1 + locales/pt_BR/translations.php | 1 + models/google.php | 4 +++- 12 files changed, 88 insertions(+), 2 deletions(-) diff --git a/actions/task_assign_color_user.php b/actions/task_assign_color_user.php index cd8bee44..d3ce1fbe 100644 --- a/actions/task_assign_color_user.php +++ b/actions/task_assign_color_user.php @@ -12,6 +12,14 @@ require_once __DIR__.'/base.php'; */ class TaskAssignColorUser extends Base { + /** + * Task model + * + * @accesss private + * @var \Model\Task + */ + private $task; + /** * Constructor * diff --git a/actions/task_assign_current_user.php b/actions/task_assign_current_user.php index c3843d85..a3d9559e 100644 --- a/actions/task_assign_current_user.php +++ b/actions/task_assign_current_user.php @@ -12,6 +12,22 @@ require_once __DIR__.'/base.php'; */ class TaskAssignCurrentUser extends Base { + /** + * Task model + * + * @accesss private + * @var \Model\Task + */ + private $task; + + /** + * Acl model + * + * @accesss private + * @var \Model\Acl + */ + private $acl; + /** * Constructor * diff --git a/actions/task_assign_specific_user.php b/actions/task_assign_specific_user.php index 0d5b1b51..aabe5420 100644 --- a/actions/task_assign_specific_user.php +++ b/actions/task_assign_specific_user.php @@ -12,6 +12,14 @@ require_once __DIR__.'/base.php'; */ class TaskAssignSpecificUser extends Base { + /** + * Task model + * + * @accesss private + * @var \Model\Task + */ + private $task; + /** * Constructor * diff --git a/actions/task_close.php b/actions/task_close.php index 8a6c8999..22d61f29 100644 --- a/actions/task_close.php +++ b/actions/task_close.php @@ -12,6 +12,14 @@ require_once __DIR__.'/base.php'; */ class TaskClose extends Base { + /** + * Task model + * + * @accesss private + * @var \Model\Task + */ + private $task; + /** * Constructor * diff --git a/actions/task_duplicate_another_project.php b/actions/task_duplicate_another_project.php index 614e2dda..6e1ee84b 100644 --- a/actions/task_duplicate_another_project.php +++ b/actions/task_duplicate_another_project.php @@ -12,6 +12,14 @@ require_once __DIR__.'/base.php'; */ class TaskDuplicateAnotherProject extends Base { + /** + * Task model + * + * @accesss private + * @var \Model\Task + */ + private $task; + /** * Constructor * diff --git a/controllers/base.php b/controllers/base.php index 6b5555c4..b4f438c3 100644 --- a/controllers/base.php +++ b/controllers/base.php @@ -10,6 +10,38 @@ namespace Controller; */ abstract class Base { + /** + * Request instance + * + * @accesss public + * @var \Core\Request + */ + public $request; + + /** + * Response instance + * + * @accesss public + * @var \Core\Response + */ + public $response; + + /** + * Template instance + * + * @accesss public + * @var \Core\Template + */ + public $template; + + /** + * Session instance + * + * @accesss public + * @var \Core\Session + */ + public $session; + /** * Acl model * diff --git a/core/session.php b/core/session.php index aa4b2516..0c3ec2d9 100644 --- a/core/session.php +++ b/core/session.php @@ -20,7 +20,7 @@ class Session ); // Avoid session id in the URL - ini_set('session.use_only_cookies', true); + ini_set('session.use_only_cookies', '1'); // Ensure session ID integrity ini_set('session.entropy_file', '/dev/urandom'); diff --git a/locales/es_ES/translations.php b/locales/es_ES/translations.php index 652c5f03..e101c7ce 100644 --- a/locales/es_ES/translations.php +++ b/locales/es_ES/translations.php @@ -303,4 +303,5 @@ return array( // 'Link my Google Account' => '', // 'Unlink my Google Account' => '', // 'Login with my Google Account' => '', + // 'Project not found.' => '', ); diff --git a/locales/fr_FR/translations.php b/locales/fr_FR/translations.php index 626aa946..a77a5f57 100644 --- a/locales/fr_FR/translations.php +++ b/locales/fr_FR/translations.php @@ -303,4 +303,5 @@ return array( 'Link my Google Account' => 'Lier mon compte Google', 'Unlink my Google Account' => 'Ne plus utiliser mon compte Google', 'Login with my Google Account' => 'Se connecter avec mon compte Google', + 'Project not found.' => 'Projet introuvable.' ); diff --git a/locales/pl_PL/translations.php b/locales/pl_PL/translations.php index 732ab654..0b6d8480 100644 --- a/locales/pl_PL/translations.php +++ b/locales/pl_PL/translations.php @@ -308,4 +308,5 @@ return array( // 'Link my Google Account' => '', // 'Unlink my Google Account' => '', // 'Login with my Google Account' => '', + // 'Project not found.' => '', ); diff --git a/locales/pt_BR/translations.php b/locales/pt_BR/translations.php index 79e1cbe0..b9d273a0 100644 --- a/locales/pt_BR/translations.php +++ b/locales/pt_BR/translations.php @@ -304,4 +304,5 @@ return array( // 'Link my Google Account' => '', // 'Unlink my Google Account' => '', // 'Login with my Google Account' => '', + // 'Project not found.' => '', ); diff --git a/models/google.php b/models/google.php index 51367a60..4f83a41e 100644 --- a/models/google.php +++ b/models/google.php @@ -144,7 +144,9 @@ class Google extends Base $googleService->requestAccessToken($code); return json_decode($googleService->request('https://www.googleapis.com/oauth2/v1/userinfo'), true); } - catch (TokenResponseException $e) {} + catch (TokenResponseException $e) { + return false; + } return false; } -- cgit v1.2.3