Fix PhpAnalyzer issues

This commit is contained in:
Frederic Guillot
2015-05-24 16:47:41 -04:00
parent 03fc8a1bce
commit 1a0465cb57
8 changed files with 20 additions and 14 deletions

View File

@@ -71,7 +71,7 @@ class Link extends Base
if ($valid) { if ($valid) {
if ($this->link->create($values['label'], $values['opposite_label'])) { if ($this->link->create($values['label'], $values['opposite_label']) !== false) {
$this->session->flash(t('Link added successfully.')); $this->session->flash(t('Link added successfully.'));
$this->response->redirect($this->helper->url->to('link', 'index')); $this->response->redirect($this->helper->url->to('link', 'index'));
} }

View File

@@ -323,7 +323,7 @@ class Project extends Base
if ($this->request->getStringParam('duplicate') === 'yes') { if ($this->request->getStringParam('duplicate') === 'yes') {
$values = array_keys($this->request->getValues()); $values = array_keys($this->request->getValues());
if ($this->projectDuplication->duplicate($project['id'], $values)) { if ($this->projectDuplication->duplicate($project['id'], $values) !== false) {
$this->session->flash(t('Project cloned successfully.')); $this->session->flash(t('Project cloned successfully.'));
} else { } else {
$this->session->flashError(t('Unable to clone this project.')); $this->session->flashError(t('Unable to clone this project.'));

View File

@@ -73,7 +73,7 @@ class HipchatWebhook extends \Core\Base
if ($this->config->get('application_url')) { if ($this->config->get('application_url')) {
$html .= '<br/><a href="'.$this->config->get('application_url'); $html .= '<br/><a href="'.$this->config->get('application_url');
$html .= $this->helper->u('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id)).'">'; $html .= $this->helper->url->href('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id)).'">';
$html .= t('view the task on Kanboard').'</a>'; $html .= t('view the task on Kanboard').'</a>';
} }

View File

@@ -65,7 +65,7 @@ class SlackWebhook extends \Core\Base
if ($this->config->get('application_url')) { if ($this->config->get('application_url')) {
$payload['text'] .= ' - <'.$this->config->get('application_url'); $payload['text'] .= ' - <'.$this->config->get('application_url');
$payload['text'] .= $this->helper->u('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id)); $payload['text'] .= $this->helper->url->href('task', 'show', array('task_id' => $task_id, 'project_id' => $project_id));
$payload['text'] .= '|'.t('view the task on Kanboard').'>'; $payload['text'] .= '|'.t('view the task on Kanboard').'>';
} }

View File

@@ -35,7 +35,9 @@ class Currency extends Base
* Calculate the price for the reference currency * Calculate the price for the reference currency
* *
* @access public * @access public
* @return array * @param string $currency
* @param double $price
* @return double
*/ */
public function getPrice($currency, $price) public function getPrice($currency, $price)
{ {

View File

@@ -64,7 +64,7 @@ class Project extends Base
* *
* @access public * @access public
* @param string $identifier * @param string $identifier
* @return array * @return array|boolean
*/ */
public function getByIdentifier($identifier) public function getByIdentifier($identifier)
{ {
@@ -80,7 +80,7 @@ class Project extends Base
* *
* @access public * @access public
* @param string $token Token * @param string $token Token
* @return array * @return array|boolean
*/ */
public function getByToken($token) public function getByToken($token)
{ {

View File

@@ -111,7 +111,7 @@ class User extends Base
* *
* @access public * @access public
* @param string $google_id Google unique id * @param string $google_id Google unique id
* @return array * @return array|boolean
*/ */
public function getByGoogleId($google_id) public function getByGoogleId($google_id)
{ {
@@ -127,7 +127,7 @@ class User extends Base
* *
* @access public * @access public
* @param string $github_id GitHub user id * @param string $github_id GitHub user id
* @return array * @return array|boolean
*/ */
public function getByGitHubId($github_id) public function getByGitHubId($github_id)
{ {
@@ -155,7 +155,7 @@ class User extends Base
* *
* @access public * @access public
* @param string $email Email * @param string $email Email
* @return array * @return array|boolean
*/ */
public function getByEmail($email) public function getByEmail($email)
{ {
@@ -171,7 +171,7 @@ class User extends Base
* *
* @access public * @access public
* @param string $token Token * @param string $token Token
* @return array * @return array|boolean
*/ */
public function getByToken($token) public function getByToken($token)
{ {

View File

@@ -18,6 +18,7 @@ class DatabaseProvider implements ServiceProviderInterface
/** /**
* Setup the database driver and execute schema migration * Setup the database driver and execute schema migration
* *
* @access public
* @return \PicoDb\Database * @return \PicoDb\Database
*/ */
public function getInstance() public function getInstance()
@@ -51,9 +52,10 @@ class DatabaseProvider implements ServiceProviderInterface
/** /**
* Setup the Sqlite database driver * Setup the Sqlite database driver
* *
* @access private
* @return \PicoDb\Database * @return \PicoDb\Database
*/ */
function getSqliteInstance() private function getSqliteInstance()
{ {
require_once __DIR__.'/../Schema/Sqlite.php'; require_once __DIR__.'/../Schema/Sqlite.php';
@@ -66,9 +68,10 @@ class DatabaseProvider implements ServiceProviderInterface
/** /**
* Setup the Mysql database driver * Setup the Mysql database driver
* *
* @access private
* @return \PicoDb\Database * @return \PicoDb\Database
*/ */
function getMysqlInstance() private function getMysqlInstance()
{ {
require_once __DIR__.'/../Schema/Mysql.php'; require_once __DIR__.'/../Schema/Mysql.php';
@@ -86,9 +89,10 @@ class DatabaseProvider implements ServiceProviderInterface
/** /**
* Setup the Postgres database driver * Setup the Postgres database driver
* *
* @access private
* @return \PicoDb\Database * @return \PicoDb\Database
*/ */
public function getPostgresInstance() private function getPostgresInstance()
{ {
require_once __DIR__.'/../Schema/Postgres.php'; require_once __DIR__.'/../Schema/Postgres.php';