Verified Commit b7d354d7 authored by dockx thibault's avatar dockx thibault
Browse files

:ambulance: Fix(Tasks) - PHPCS and Fnc removal

PHPCS fixes brought by new phpcs version and
removal of unusef methodes.
Showing with 2 additions and 16 deletions
+2 -16
...@@ -32,8 +32,8 @@ class TasksColumn extends Column ...@@ -32,8 +32,8 @@ class TasksColumn extends Column
} else { } else {
switch ($this->attributes[0]) { switch ($this->attributes[0]) {
case 'fdTasksStatus': case 'fdTasksStatus':
return static::filterStatus($value); return static::filterStatus(intval($value));
case 'fdTasksMailObject': case 'fdTasksMailObject':
return "Mail Object"; return "Mail Object";
...@@ -45,7 +45,6 @@ class TasksColumn extends Column ...@@ -45,7 +45,6 @@ class TasksColumn extends Column
static function filterStatus (int $status = NULL): string static function filterStatus (int $status = NULL): string
{ {
// A call towards a status map would be interesting here. // A call towards a status map would be interesting here.
switch ($status) { switch ($status) {
case 1 : case 1 :
...@@ -60,17 +59,4 @@ class TasksColumn extends Column ...@@ -60,17 +59,4 @@ class TasksColumn extends Column
} }
} }
// Not used for now
// Find a key value in multi dimensionnal array (multi unknown levels).
static function in_array_r($needle, $haystack, $strict = FALSE)
{
foreach ($haystack as $item) {
if (($strict ? $item === $needle : $item == $needle) || (is_array($item) && in_array_r($needle, $item, $strict))) {
return true;
}
}
return false;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment