summaryrefslogtreecommitdiff
path: root/app/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-10-17 10:09:03 -0400
committerFrederic Guillot <fred@kanboard.net>2015-10-17 10:09:03 -0400
commit8c532efd5f02f7a7e5ea322a07ddcf49d130a8ec (patch)
tree289222e21420b8d0092f06de097090f179202f6b /app/Helper
parentb40190ee9fd557d86e594208ed77fa762c7dcfb7 (diff)
Run php-cs-fixer on the code base
Diffstat (limited to 'app/Helper')
-rw-r--r--app/Helper/App.php3
-rw-r--r--app/Helper/Dt.php6
-rw-r--r--app/Helper/File.php4
-rw-r--r--app/Helper/Form.php10
-rw-r--r--app/Helper/Subtask.php1
5 files changed, 11 insertions, 13 deletions
diff --git a/app/Helper/App.php b/app/Helper/App.php
index 0e84f694..19801fa8 100644
--- a/app/Helper/App.php
+++ b/app/Helper/App.php
@@ -68,8 +68,7 @@ class App extends \Kanboard\Core\Base
$html = '<div class="alert alert-success alert-fade-out">'.$this->helper->e($this->session['flash_message']).'</div>';
unset($this->session['flash_message']);
unset($this->session['flash_error_message']);
- }
- else if (isset($this->session['flash_error_message'])) {
+ } elseif (isset($this->session['flash_error_message'])) {
$html = '<div class="alert alert-error">'.$this->helper->e($this->session['flash_error_message']).'</div>';
unset($this->session['flash_message']);
unset($this->session['flash_error_message']);
diff --git a/app/Helper/Dt.php b/app/Helper/Dt.php
index e717a4c0..78002b1b 100644
--- a/app/Helper/Dt.php
+++ b/app/Helper/Dt.php
@@ -52,11 +52,9 @@ class Dt extends \Kanboard\Core\Base
}
if ($diff < 1200) {
return t('<30m');
- }
- else if ($diff < 3600) {
+ } elseif ($diff < 3600) {
return t('<1h');
- }
- else if ($diff < 86400) {
+ } elseif ($diff < 86400) {
return '~'.t('%dh', $diff / 3600);
}
diff --git a/app/Helper/File.php b/app/Helper/File.php
index b0a7f675..d2cdfc6a 100644
--- a/app/Helper/File.php
+++ b/app/Helper/File.php
@@ -17,8 +17,8 @@ class File extends \Kanboard\Core\Base
* @param string $filename Filename
* @return string Font-Awesome-Icon-Name
*/
- public function icon($filename){
-
+ public function icon($filename)
+ {
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
switch ($extension) {
diff --git a/app/Helper/Form.php b/app/Helper/Form.php
index 92d07ccc..5f19f2a8 100644
--- a/app/Helper/Form.php
+++ b/app/Helper/Form.php
@@ -52,11 +52,14 @@ class Form extends \Kanboard\Core\Base
$html = '<select name="'.$name.'" id="form-'.$name.'" class="'.$class.'" '.implode(' ', $attributes).'>';
foreach ($options as $id => $value) {
-
$html .= '<option value="'.$this->helper->e($id).'"';
- if (isset($values->$name) && $id == $values->$name) $html .= ' selected="selected"';
- if (isset($values[$name]) && $id == $values[$name]) $html .= ' selected="selected"';
+ if (isset($values->$name) && $id == $values->$name) {
+ $html .= ' selected="selected"';
+ }
+ if (isset($values[$name]) && $id == $values[$name]) {
+ $html .= ' selected="selected"';
+ }
$html .= '>'.$this->helper->e($value).'</option>';
}
@@ -328,7 +331,6 @@ class Form extends \Kanboard\Core\Base
$html = '';
if (isset($errors[$name])) {
-
$html .= '<ul class="form-errors">';
foreach ($errors[$name] as $error) {
diff --git a/app/Helper/Subtask.php b/app/Helper/Subtask.php
index d103d453..1f367b27 100644
--- a/app/Helper/Subtask.php
+++ b/app/Helper/Subtask.php
@@ -21,7 +21,6 @@ class Subtask extends \Kanboard\Core\Base
public function toggleStatus(array $subtask, $redirect)
{
if ($subtask['status'] == 0 && isset($this->session['has_subtask_inprogress']) && $this->session['has_subtask_inprogress'] === true) {
-
return $this->helper->url->link(
trim($this->template->render('subtask/icons', array('subtask' => $subtask))) . $this->helper->e($subtask['title']),
'subtask',