Passed
Push — master ( 528684...097ab9 )
by y
13:21 queued 01:43
created
src/Api/Cache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param AbstractEntity $entity
35 35
      * @return bool Success
36 36
      */
37
-    public function add (AbstractEntity $entity): bool {
37
+    public function add(AbstractEntity $entity): bool {
38 38
         if ($gid = $entity->getGid() and !$entity->isDiff()) {
39 39
             $this->entities[$gid] = $entity;
40 40
             $this->addKeys($gid, $entity->getCacheKeys());
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @param string $gid
50 50
      * @param string[] $keys
51 51
      */
52
-    protected function addKeys (string $gid, array $keys): void {
52
+    protected function addKeys(string $gid, array $keys): void {
53 53
         $this->gids += array_fill_keys($keys, $gid);
54 54
     }
55 55
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param Closure $factory `fn( Api|Data $caller ): null|AbstractEntity`
65 65
      * @return null|mixed|AbstractEntity
66 66
      */
67
-    public function get (string $key, $caller, Closure $factory) {
67
+    public function get(string $key, $caller, Closure $factory) {
68 68
         // POOL HIT
69 69
         if ($gid = $this->gids[$key] ?? null) {
70 70
             return $this->entities[$gid];
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      *
93 93
      * @param AbstractEntity $entity
94 94
      */
95
-    public function remove (AbstractEntity $entity): void {
95
+    public function remove(AbstractEntity $entity): void {
96 96
         $gid = $entity->getGid();
97 97
         unset($this->entities[$gid]);
98 98
         foreach ($entity->getCacheKeys() as $key) {
Please login to merge, or discard this patch.
src/Api/LoggerInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,5 +12,5 @@
 block discarded – undo
12 12
      * @param string $path
13 13
      * @param null|array $data
14 14
      */
15
-    public function log (string $message, string $path, array $data = null): void;
15
+    public function log(string $message, string $path, array $data = null): void;
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Base/AbstractEntity/CreateTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
      *
13 13
      * @return string
14 14
      */
15
-    abstract protected function _getDir (): string;
15
+    abstract protected function _getDir(): string;
16 16
 
17 17
     /**
18 18
      * `POST` the new entity to Asana.
19 19
      *
20 20
      * @return $this
21 21
      */
22
-    public function create () {
22
+    public function create() {
23 23
         return $this->{'_save'}($this->_getDir());
24 24
     }
25 25
 }
26 26
\ No newline at end of file
Please login to merge, or discard this patch.
src/Base/AbstractEntity/DeleteTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     /**
11 11
      * `DELETE`
12 12
      */
13
-    public function delete (): void {
13
+    public function delete(): void {
14 14
         $this->{'_delete'}();
15 15
     }
16 16
 }
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
src/Base/AbstractEntity/UpdateTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      *
13 13
      * @return $this
14 14
      */
15
-    public function update () {
15
+    public function update() {
16 16
         return $this->{'_save'}();
17 17
     }
18 18
 }
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
src/CustomField/EnumOption.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,23 +33,23 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected $customField;
35 35
 
36
-    public function __construct (CustomField $customField, array $data = []) {
36
+    public function __construct(CustomField $customField, array $data = []) {
37 37
         parent::__construct($customField, $data);
38 38
         $this->customField = $customField;
39 39
     }
40 40
 
41
-    final public function __toString (): string {
41
+    final public function __toString(): string {
42 42
         return "enum_options/{$this->getGid()}";
43 43
     }
44 44
 
45
-    final protected function _getDir (): string {
45
+    final protected function _getDir(): string {
46 46
         return "{$this->customField}/enum_options";
47 47
     }
48 48
 
49 49
     /**
50 50
      * @return CustomField
51 51
      */
52
-    public function getCustomField () {
52
+    public function getCustomField() {
53 53
         return $this->customField;
54 54
     }
55 55
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @param EnumOption $option
59 59
      * @return $this
60 60
      */
61
-    public function moveAfter (EnumOption $option) {
61
+    public function moveAfter(EnumOption $option) {
62 62
         $this->api->post("{$this->_getDir()}/insert", [
63 63
             'after_enum_option' => $option->getGid(),
64 64
             'enum_option' => $this->getGid()
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      * @param EnumOption $option
73 73
      * @return $this
74 74
      */
75
-    public function moveBefore (EnumOption $option) {
75
+    public function moveBefore(EnumOption $option) {
76 76
         $this->api->post("{$this->_getDir()}/insert", [
77 77
             'before_enum_option' => $option->getGid(),
78 78
             'enum_option' => $this->getGid()
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     /**
85 85
      * @return $this
86 86
      */
87
-    public function moveFirst () {
87
+    public function moveFirst() {
88 88
         $first = $this->customField->getEnumOptions()[0];
89 89
         if ($first !== $this) {
90 90
             $this->moveBefore($first);
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * @return $this
97 97
      */
98
-    public function moveLast () {
98
+    public function moveLast() {
99 99
         $options = $this->customField->getEnumOptions();
100 100
         $last = $options[count($options) - 1];
101 101
         if ($last !== $this) {
Please login to merge, or discard this patch.
src/Base/AbstractEntity/WorkspaceTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      * @param Workspace $workspace
18 18
      * @return $this
19 19
      */
20
-    public function setWorkspace (Workspace $workspace) {
20
+    public function setWorkspace(Workspace $workspace) {
21 21
         return $this->{'_set'}('workspace', $workspace);
22 22
     }
23 23
 }
24 24
\ No newline at end of file
Please login to merge, or discard this patch.
src/Task/External.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected $task;
26 26
 
27
-    public function __construct (Task $task, array $data = []) {
27
+    public function __construct(Task $task, array $data = []) {
28 28
         parent::__construct($task, $data);
29 29
         $this->task = $task;
30 30
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param mixed $value
37 37
      * @return $this
38 38
      */
39
-    protected function _set (string $field, $value) {
39
+    protected function _set(string $field, $value) {
40 40
         $this->task->diff['external'] = true;
41 41
         return parent::_set($field, $value);
42 42
     }
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @return null|bool|number|string|array
48 48
      */
49
-    public function getDataJsonDecoded () {
49
+    public function getDataJsonDecoded() {
50 50
         if (strlen($data = $this->getData())) {
51
-            return json_decode($data, true, 512, JSON_BIGINT_AS_STRING | JSON_THROW_ON_ERROR);
51
+            return json_decode($data, true, 512, JSON_BIGINT_AS_STRING|JSON_THROW_ON_ERROR);
52 52
         }
53 53
         return null;
54 54
     }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @param mixed $data
61 61
      * @return $this
62 62
      */
63
-    public function setDataJsonEncoded ($data) {
63
+    public function setDataJsonEncoded($data) {
64 64
         if (isset($data)) {
65 65
             return $this->setData(json_encode($data, JSON_THROW_ON_ERROR));
66 66
         }
Please login to merge, or discard this patch.
src/User/TaskList.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@  discard block
 block discarded – undo
30 30
         'workspace' => Workspace::class
31 31
     ];
32 32
 
33
-    final public function __toString (): string {
33
+    final public function __toString(): string {
34 34
         return "user_task_lists/{$this->getGid()}";
35 35
     }
36 36
 
37
-    public function getCacheKeys () {
37
+    public function getCacheKeys() {
38 38
         $keys = parent::getCacheKeys();
39 39
 
40 40
         /** @see User::getTaskList() */
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     /**
49 49
      * @return Task[]
50 50
      */
51
-    public function getIncompleteTasks () {
51
+    public function getIncompleteTasks() {
52 52
         return $this->getTasks(['completed_since' => 'now']);
53 53
     }
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      *
58 58
      * @return ArrayIterator|Task[]
59 59
      */
60
-    public function getIterator () {
60
+    public function getIterator() {
61 61
         return new ArrayIterator($this->getTasks());
62 62
     }
63 63
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * @param array $filter
70 70
      * @return Task[]
71 71
      */
72
-    public function getTasks (array $filter = []) {
72
+    public function getTasks(array $filter = []) {
73 73
         return $this->loadAll(Task::class, "{$this}/tasks", $filter);
74 74
     }
75 75
 }
76 76
\ No newline at end of file
Please login to merge, or discard this patch.