diff --git a/src/FabianBeiner/Todoist/TodoistCommentsTrait.php b/src/FabianBeiner/Todoist/TodoistCommentsTrait.php index 6aafa35..e1e2cd5 100644 --- a/src/FabianBeiner/Todoist/TodoistCommentsTrait.php +++ b/src/FabianBeiner/Todoist/TodoistCommentsTrait.php @@ -108,9 +108,9 @@ public function createComment(string $commentType, int $typeId, string $comment) } $data = $this->preparePostData([ - $commentType . '_id' => $typeId, - 'content' => $comment, - ]); + $commentType . '_id' => $typeId, + 'content' => $comment, + ]); /** @var object $result Result of the POST request. */ $result = $this->post('comments', $data); @@ -168,7 +168,6 @@ public function getComment(int $commentId) */ public function updateComment(int $commentId, string $content): bool { - $content = filter_var($content, FILTER_SANITIZE_STRING); if ( ! strlen($content) || ! $this->validateId($commentId)) { return false; } diff --git a/src/FabianBeiner/Todoist/TodoistLabelsTrait.php b/src/FabianBeiner/Todoist/TodoistLabelsTrait.php index 7cfd13c..06dfaf4 100644 --- a/src/FabianBeiner/Todoist/TodoistLabelsTrait.php +++ b/src/FabianBeiner/Todoist/TodoistLabelsTrait.php @@ -47,7 +47,6 @@ public function getAllLabels() */ public function createLabel(string $labelName, array $optionalParameters = []) { - $labelName = filter_var($labelName, FILTER_SANITIZE_STRING); if ( ! strlen($labelName)) { return false; } @@ -104,7 +103,6 @@ public function getLabel(int $labelId) */ public function updateLabel(int $labelId, string $newLabelName, array $optionalParameters = []): bool { - $newLabelName = filter_var($newLabelName, FILTER_SANITIZE_STRING); if ( ! strlen($newLabelName) || ! $this->validateId($labelId)) { return false; } diff --git a/src/FabianBeiner/Todoist/TodoistProjectsTrait.php b/src/FabianBeiner/Todoist/TodoistProjectsTrait.php index e24c943..ce7beb6 100644 --- a/src/FabianBeiner/Todoist/TodoistProjectsTrait.php +++ b/src/FabianBeiner/Todoist/TodoistProjectsTrait.php @@ -47,7 +47,6 @@ public function getAllProjects() */ public function createProject(string $projectName, array $optionalParameters = []) { - $projectName = filter_var($projectName, FILTER_SANITIZE_STRING); if ( ! strlen($projectName)) { return false; } @@ -102,7 +101,6 @@ public function getProject(int $projectId) */ public function updateProject(int $projectId, string $newProjectName, array $optionalParameters = []): bool { - $newProjectName = filter_var($newProjectName, FILTER_SANITIZE_STRING); if ( ! strlen($newProjectName) || ! $this->validateId($projectId)) { return false; } diff --git a/src/FabianBeiner/Todoist/TodoistSectionsTrait.php b/src/FabianBeiner/Todoist/TodoistSectionsTrait.php index a12fff9..6b1ec03 100644 --- a/src/FabianBeiner/Todoist/TodoistSectionsTrait.php +++ b/src/FabianBeiner/Todoist/TodoistSectionsTrait.php @@ -55,7 +55,6 @@ public function getAllSections(int $projectId = 0) */ public function createSection(string $sectionName, int $projectId, array $optionalParameters = []) { - $sectionName = filter_var($sectionName, FILTER_SANITIZE_STRING); if ( ! strlen($sectionName) || ! $this->validateId($projectId)) { return false; } @@ -110,7 +109,6 @@ public function getSection(int $sectionId) */ public function updateSection(int $sectionId, string $newSectionName): bool { - $newSectionName = filter_var($newSectionName, FILTER_SANITIZE_STRING); if ( ! strlen($newSectionName) || ! $this->validateId($sectionId)) { return false; } diff --git a/src/FabianBeiner/Todoist/TodoistTasksTrait.php b/src/FabianBeiner/Todoist/TodoistTasksTrait.php index 91ae5a0..54af022 100644 --- a/src/FabianBeiner/Todoist/TodoistTasksTrait.php +++ b/src/FabianBeiner/Todoist/TodoistTasksTrait.php @@ -48,7 +48,6 @@ public function getAllTasks(array $options = []) */ public function createTask(string $content, array $options = []) { - $content = filter_var($content, FILTER_SANITIZE_STRING); if ( ! strlen($content)) { return false; } @@ -92,7 +91,6 @@ public function getTask(int $taskId) */ public function updateTask(int $taskId, string $content = null, array $options = []): bool { - $content = filter_var($content, FILTER_SANITIZE_STRING); if ( ! $this->validateId($taskId)) { return false; }