Fix PhpAnalyzer issues
This commit is contained in:
parent
03fc8a1bce
commit
1a0465cb57
|
|
@ -71,7 +71,7 @@ class Link extends Base
|
|||
|
||||
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->response->redirect($this->helper->url->to('link', 'index'));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -323,7 +323,7 @@ class Project extends Base
|
|||
|
||||
if ($this->request->getStringParam('duplicate') === 'yes') {
|
||||
$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.'));
|
||||
} else {
|
||||
$this->session->flashError(t('Unable to clone this project.'));
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class HipchatWebhook extends \Core\Base
|
|||
|
||||
if ($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>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class SlackWebhook extends \Core\Base
|
|||
|
||||
if ($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').'>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,9 @@ class Currency extends Base
|
|||
* Calculate the price for the reference currency
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
* @param string $currency
|
||||
* @param double $price
|
||||
* @return double
|
||||
*/
|
||||
public function getPrice($currency, $price)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Project extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $identifier
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByIdentifier($identifier)
|
||||
{
|
||||
|
|
@ -80,7 +80,7 @@ class Project extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $token Token
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByToken($token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class User extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $google_id Google unique id
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByGoogleId($google_id)
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ class User extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $github_id GitHub user id
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByGitHubId($github_id)
|
||||
{
|
||||
|
|
@ -155,7 +155,7 @@ class User extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $email Email
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByEmail($email)
|
||||
{
|
||||
|
|
@ -171,7 +171,7 @@ class User extends Base
|
|||
*
|
||||
* @access public
|
||||
* @param string $token Token
|
||||
* @return array
|
||||
* @return array|boolean
|
||||
*/
|
||||
public function getByToken($token)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class DatabaseProvider implements ServiceProviderInterface
|
|||
/**
|
||||
* Setup the database driver and execute schema migration
|
||||
*
|
||||
* @access public
|
||||
* @return \PicoDb\Database
|
||||
*/
|
||||
public function getInstance()
|
||||
|
|
@ -51,9 +52,10 @@ class DatabaseProvider implements ServiceProviderInterface
|
|||
/**
|
||||
* Setup the Sqlite database driver
|
||||
*
|
||||
* @access private
|
||||
* @return \PicoDb\Database
|
||||
*/
|
||||
function getSqliteInstance()
|
||||
private function getSqliteInstance()
|
||||
{
|
||||
require_once __DIR__.'/../Schema/Sqlite.php';
|
||||
|
||||
|
|
@ -66,9 +68,10 @@ class DatabaseProvider implements ServiceProviderInterface
|
|||
/**
|
||||
* Setup the Mysql database driver
|
||||
*
|
||||
* @access private
|
||||
* @return \PicoDb\Database
|
||||
*/
|
||||
function getMysqlInstance()
|
||||
private function getMysqlInstance()
|
||||
{
|
||||
require_once __DIR__.'/../Schema/Mysql.php';
|
||||
|
||||
|
|
@ -86,9 +89,10 @@ class DatabaseProvider implements ServiceProviderInterface
|
|||
/**
|
||||
* Setup the Postgres database driver
|
||||
*
|
||||
* @access private
|
||||
* @return \PicoDb\Database
|
||||
*/
|
||||
public function getPostgresInstance()
|
||||
private function getPostgresInstance()
|
||||
{
|
||||
require_once __DIR__.'/../Schema/Postgres.php';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue