PHP 8 Compatibility
This commit is contained in:
@@ -32,7 +32,7 @@ class ProjectStatusFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(ProjectModel::TABLE.'.is_active', $this->value);
|
||||
} elseif ($this->value === 'inactive' || $this->value === 'closed' || $this->value === 'disabled') {
|
||||
$this->query->eq(ProjectModel::TABLE.'.is_active', 0);
|
||||
|
||||
@@ -32,7 +32,7 @@ class ProjectTypeFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(ProjectModel::TABLE.'.is_private', $this->value);
|
||||
} elseif ($this->value === 'private') {
|
||||
$this->query->eq(ProjectModel::TABLE.'.is_private', ProjectModel::TYPE_PRIVATE);
|
||||
|
||||
@@ -54,7 +54,7 @@ class TaskAssigneeFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.owner_id', $this->value);
|
||||
} else {
|
||||
switch ($this->value) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class TaskCategoryFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.category_id', $this->value);
|
||||
} elseif ($this->value === 'none') {
|
||||
$this->query->eq(TaskModel::TABLE.'.category_id', 0);
|
||||
|
||||
@@ -33,7 +33,7 @@ class TaskColumnFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.column_id', $this->value);
|
||||
} else {
|
||||
$this->query->eq(ColumnModel::TABLE.'.title', $this->value);
|
||||
|
||||
@@ -53,7 +53,7 @@ class TaskCreatorFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.creator_id', $this->value);
|
||||
} else {
|
||||
switch ($this->value) {
|
||||
|
||||
@@ -33,7 +33,7 @@ class TaskProjectFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.project_id', $this->value);
|
||||
} else {
|
||||
$this->query->ilike(ProjectModel::TABLE.'.name', $this->value);
|
||||
|
||||
@@ -34,7 +34,7 @@ class TaskStatusFilter extends BaseFilter implements FilterInterface
|
||||
{
|
||||
if ($this->value === 'open' || $this->value === 'closed') {
|
||||
$this->query->eq(TaskModel::TABLE.'.is_active', $this->value === 'open' ? TaskModel::STATUS_OPEN : TaskModel::STATUS_CLOSED);
|
||||
} elseif (is_int($this->value) || ctype_digit($this->value)) {
|
||||
} elseif (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$this->query->eq(TaskModel::TABLE.'.is_active', $this->value);
|
||||
}
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class TaskSubtaskAssigneeFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
protected function applySubQueryFilter(Table $subquery)
|
||||
{
|
||||
if (is_int($this->value) || ctype_digit($this->value)) {
|
||||
if (is_int($this->value) || ctype_digit((string) $this->value)) {
|
||||
$subquery->eq(SubtaskModel::TABLE.'.user_id', $this->value);
|
||||
} else {
|
||||
switch ($this->value) {
|
||||
|
||||
@@ -32,7 +32,7 @@ class TaskTitleFilter extends BaseFilter implements FilterInterface
|
||||
*/
|
||||
public function apply()
|
||||
{
|
||||
if (ctype_digit($this->value) || (strlen($this->value) > 1 && $this->value[0] === '#' && ctype_digit(substr($this->value, 1)))) {
|
||||
if (ctype_digit((string) $this->value) || (strlen($this->value) > 1 && $this->value[0] === '#' && ctype_digit(substr($this->value, 1)))) {
|
||||
$this->query->beginOr();
|
||||
$this->query->eq(TaskModel::TABLE.'.id', str_replace('#', '', $this->value));
|
||||
$this->query->ilike(TaskModel::TABLE.'.title', '%'.$this->value.'%');
|
||||
|
||||
Reference in New Issue
Block a user