Passed
Push — master ( b6e1f4...929753 )
by Jérémy
01:51
created
src/Model/TagDto.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
     public static function fromArray(array $data): self
14 14
     {
15 15
         return new self(
16
-            $data['id'],
17
-            $data['name'],
18
-            $data['workspaceId']
16
+            $data[ 'id' ],
17
+            $data[ 'name' ],
18
+            $data[ 'workspaceId' ]
19 19
         );
20 20
     }
21 21
 
Please login to merge, or discard this patch.
src/Model/MembershipDto.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
     public static function fromArray(array $data): self
16 16
     {
17 17
         return new self(
18
-            $data['hourlyRate'] ? HourlyRateDto::fromArray($data['hourlyRate']) : null,
19
-            new MembershipEnum($data['membershipStatus']),
20
-            $data['membershipType'],
21
-            $data['targetId'],
22
-            $data['userId']
18
+            $data[ 'hourlyRate' ] ? HourlyRateDto::fromArray($data[ 'hourlyRate' ]) : null,
19
+            new MembershipEnum($data[ 'membershipStatus' ]),
20
+            $data[ 'membershipType' ],
21
+            $data[ 'targetId' ],
22
+            $data[ 'userId' ]
23 23
         );
24 24
     }
25 25
 
Please login to merge, or discard this patch.
src/Model/HourlyRateDto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public static function fromArray(array $data): self
13 13
     {
14
-        return new self($data['amount'], $data['currency']);
14
+        return new self($data[ 'amount' ], $data[ 'currency' ]);
15 15
     }
16 16
 
17 17
     public function __construct(int $amount, string $currency)
Please login to merge, or discard this patch.
src/Model/WorkspaceDto.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@
 block discarded – undo
16 16
     public static function fromArray(array $data): self
17 17
     {
18 18
         return new self(
19
-            HourlyRateDto::fromArray($data['hourlyRate']),
20
-            $data['id'],
21
-            $data['imageUrl'],
19
+            HourlyRateDto::fromArray($data[ 'hourlyRate' ]),
20
+            $data[ 'id' ],
21
+            $data[ 'imageUrl' ],
22 22
             array_map(
23 23
                 static function(array $data): MembershipDto {
24 24
                     return MembershipDto::fromArray($data);
25 25
                 },
26
-                $data['memberships']
26
+                $data[ 'memberships' ]
27 27
             ),
28
-            $data['name'],
29
-            WorkspaceSettingsDto::fromArray($data['workspaceSettings'])
28
+            $data[ 'name' ],
29
+            WorkspaceSettingsDto::fromArray($data[ 'workspaceSettings' ])
30 30
         );
31 31
     }
32 32
 
Please login to merge, or discard this patch.
src/Model/WorkspaceSettingsDto.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -35,28 +35,28 @@
 block discarded – undo
35 35
                 static function(string $page): PagesEnum {
36 36
                     return new PagesEnum($page);
37 37
                 },
38
-                $data['adminOnlyPages']
38
+                $data[ 'adminOnlyPages' ]
39 39
             ),
40
-            $data['automaticLock'] ? AutomaticLockDto::fromArray($data['automaticLock']) : null,
41
-            $data['canSeeTimeSheet'],
42
-            $data['defaultBillableProjects'],
43
-            $data['forceDescription'],
44
-            $data['forceProjects'],
45
-            $data['forceTags'],
46
-            $data['forceTasks'],
47
-            $data['lockTimeEntries'],
48
-            $data['onlyAdminsCreateProject'],
49
-            $data['onlyAdminsCreateTag'],
50
-            $data['onlyAdminsSeeAllTimeEntries'],
51
-            $data['onlyAdminsSeeBillableRates'],
52
-            $data['onlyAdminsSeeDashboard'],
53
-            $data['onlyAdminsSeePublicProjectsEntries'],
54
-            $data['projectFavorites'],
55
-            $data['projectGroupingLabel'],
56
-            $data['projectPickerSpecialFilter'],
57
-            Round::fromArray($data['round']),
58
-            $data['timeRoundingInReports'],
59
-            $data['trackTimeDownToSecond']
40
+            $data[ 'automaticLock' ] ? AutomaticLockDto::fromArray($data[ 'automaticLock' ]) : null,
41
+            $data[ 'canSeeTimeSheet' ],
42
+            $data[ 'defaultBillableProjects' ],
43
+            $data[ 'forceDescription' ],
44
+            $data[ 'forceProjects' ],
45
+            $data[ 'forceTags' ],
46
+            $data[ 'forceTasks' ],
47
+            $data[ 'lockTimeEntries' ],
48
+            $data[ 'onlyAdminsCreateProject' ],
49
+            $data[ 'onlyAdminsCreateTag' ],
50
+            $data[ 'onlyAdminsSeeAllTimeEntries' ],
51
+            $data[ 'onlyAdminsSeeBillableRates' ],
52
+            $data[ 'onlyAdminsSeeDashboard' ],
53
+            $data[ 'onlyAdminsSeePublicProjectsEntries' ],
54
+            $data[ 'projectFavorites' ],
55
+            $data[ 'projectGroupingLabel' ],
56
+            $data[ 'projectPickerSpecialFilter' ],
57
+            Round::fromArray($data[ 'round' ]),
58
+            $data[ 'timeRoundingInReports' ],
59
+            $data[ 'trackTimeDownToSecond' ]
60 60
         );
61 61
     }
62 62
 
Please login to merge, or discard this patch.
src/Model/Round.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     public static function fromArray(array $data): self
13 13
     {
14 14
         return new self(
15
-            $data['minutes'],
16
-            $data['round']
15
+            $data[ 'minutes' ],
16
+            $data[ 'round' ]
17 17
         );
18 18
     }
19 19
 
Please login to merge, or discard this patch.
src/Model/AutomaticLockDto.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@
 block discarded – undo
16 16
     public static function fromArray(array $data): self
17 17
     {
18 18
         return new self(
19
-            new DaysEnum($data['changeDay']),
20
-            $data['dayOfMonth'],
21
-            new DaysEnum($data['firstDay']),
22
-            new PeriodEnum($data['olderThanPeriod']),
23
-            $data['olderThanValue'],
24
-            new AutomaticLockEnum($data['type'])
19
+            new DaysEnum($data[ 'changeDay' ]),
20
+            $data[ 'dayOfMonth' ],
21
+            new DaysEnum($data[ 'firstDay' ]),
22
+            new PeriodEnum($data[ 'olderThanPeriod' ]),
23
+            $data[ 'olderThanValue' ],
24
+            new AutomaticLockEnum($data[ 'type' ])
25 25
         );
26 26
     }
27 27
 
Please login to merge, or discard this patch.
src/Api/Tag/Tag.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@
 block discarded – undo
22 22
     /**
23 23
      * @return TagDto[]
24 24
      */
25
-    public function tags(string $workspaceId, array $params = []): array
25
+    public function tags(string $workspaceId, array $params = [ ]): array
26 26
     {
27
-        if (isset($params['name']) && empty($params['name'])) {
27
+        if (isset($params[ 'name' ]) && empty($params[ 'name' ])) {
28 28
             throw new ClockifyException('Invalid "name" parameter');
29 29
         }
30 30
 
31
-        if (isset($params['page']) && (!is_int($params['page']) || $params['page'] < 1)) {
31
+        if (isset($params[ 'page' ]) && (!is_int($params[ 'page' ]) || $params[ 'page' ] < 1)) {
32 32
             throw new ClockifyException('Invalid "page" parameter');
33 33
         }
34 34
 
35
-        if (isset($params['page-size']) && (!is_int($params['page-size']) || $params['page-size'] < 1)) {
35
+        if (isset($params[ 'page-size' ]) && (!is_int($params[ 'page-size' ]) || $params[ 'page-size' ] < 1)) {
36 36
             throw new ClockifyException('Invalid "page-size" parameter');
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Api/Client/Client.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@
 block discarded – undo
20 20
     /**
21 21
      * @return ClientDto[]
22 22
      */
23
-    public function clients(string $workspaceId, array $params = []): array
23
+    public function clients(string $workspaceId, array $params = [ ]): array
24 24
     {
25
-        if (isset($params['name']) && empty($params['name'])) {
25
+        if (isset($params[ 'name' ]) && empty($params[ 'name' ])) {
26 26
             throw new ClockifyException('Invalid "name" parameter');
27 27
         }
28 28
 
29
-        if (isset($params['page']) && (!is_int($params['page']) || $params['page'] < 1)) {
29
+        if (isset($params[ 'page' ]) && (!is_int($params[ 'page' ]) || $params[ 'page' ] < 1)) {
30 30
             throw new ClockifyException('Invalid "page" parameter');
31 31
         }
32 32
 
33
-        if (isset($params['page-size']) && (!is_int($params['page-size']) || $params['page-size'] < 1)) {
33
+        if (isset($params[ 'page-size' ]) && (!is_int($params[ 'page-size' ]) || $params[ 'page-size' ] < 1)) {
34 34
             throw new ClockifyException('Invalid "page-size" parameter');
35 35
         }
36 36
 
Please login to merge, or discard this patch.