Passed
Branch 1.2.0 (3e6feb)
by Mauro
06:55
created
Category
src/Service/Task/Base.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     protected static function validateTaskName(string $name): string
33 33
     {
34
-        if (! v::length(2, 100)->validate($name)) {
34
+        if (!v::length(2, 100)->validate($name)) {
35 35
             throw new Task('Invalid name.', 400);
36 36
         }
37 37
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected static function validateTaskStatus(int $status): int
42 42
     {
43
-        if (! v::numeric()->between(0, 1)->validate($status)) {
43
+        if (!v::numeric()->between(0, 1)->validate($status)) {
44 44
             throw new Task('Invalid status', 400);
45 45
         }
46 46
 
Please login to merge, or discard this patch.
src/Service/Task/TaskService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public function create(array $input)
42 42
     {
43 43
         $data = json_decode(json_encode($input), false);
44
-        if (! isset($data->name)) {
44
+        if (!isset($data->name)) {
45 45
             throw new Task('The field "name" is required.', 400);
46 46
         }
47 47
         self::validateTaskName($data->name);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $task = $this->getTaskFromDb($taskId, (int) $input['decoded']->sub);
66 66
         $data = json_decode(json_encode($input), false);
67
-        if (! isset($data->name) && ! isset($data->status)) {
67
+        if (!isset($data->name) && !isset($data->status)) {
68 68
             throw new Task('Enter the data to update the task.', 400);
69 69
         }
70 70
         if (isset($data->name)) {
Please login to merge, or discard this patch.
src/Service/Note/Base.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     protected static function validateNoteName(string $name): string
28 28
     {
29
-        if (! v::length(2, 50)->validate($name)) {
29
+        if (!v::length(2, 50)->validate($name)) {
30 30
             throw new Note('The name of the note is invalid.', 400);
31 31
         }
32 32
 
Please login to merge, or discard this patch.
src/Service/Note/NoteService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function create($input)
33 33
     {
34 34
         $data = json_decode(json_encode($input), false);
35
-        if (! isset($data->name)) {
35
+        if (!isset($data->name)) {
36 36
             throw new Note('Invalid data: name is required.', 400);
37 37
         }
38 38
         self::validateNoteName($data->name);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $note = $this->getOneFromDb($noteId);
51 51
         $data = json_decode(json_encode($input), false);
52
-        if (! isset($data->name) && ! isset($data->description)) {
52
+        if (!isset($data->name) && !isset($data->description)) {
53 53
             throw new Note('Enter the data to update the note.', 400);
54 54
         }
55 55
         if (isset($data->name)) {
Please login to merge, or discard this patch.