Passed
Push — master ( b6e1f4...929753 )
by Jérémy
01:51
created
src/Model/ProjectDtoImpl.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,24 +23,24 @@
 block discarded – undo
23 23
     public static function fromArray(array $data): self
24 24
     {
25 25
         return new self(
26
-            $data['archived'],
27
-            $data['billable'],
28
-            $data['clientId'],
29
-            $data['clientName'],
30
-            $data['color'],
31
-            $data['duration'],
32
-            EstimateDto::fromArray($data['estimate']),
33
-            HourlyRateDto::fromArray($data['hourlyRate']),
34
-            $data['id'],
26
+            $data[ 'archived' ],
27
+            $data[ 'billable' ],
28
+            $data[ 'clientId' ],
29
+            $data[ 'clientName' ],
30
+            $data[ 'color' ],
31
+            $data[ 'duration' ],
32
+            EstimateDto::fromArray($data[ 'estimate' ]),
33
+            HourlyRateDto::fromArray($data[ 'hourlyRate' ]),
34
+            $data[ 'id' ],
35 35
             array_map(
36 36
                 static function(array $membership): MembershipDto {
37 37
                     return MembershipDto::fromArray($membership);
38 38
                 },
39
-                $data['memberships']
39
+                $data[ 'memberships' ]
40 40
             ),
41
-            $data['name'],
42
-            $data['public'],
43
-            $data['workspaceId']
41
+            $data[ 'name' ],
42
+            $data[ 'public' ],
43
+            $data[ 'workspaceId' ]
44 44
         );
45 45
     }
46 46
 
Please login to merge, or discard this patch.
src/Model/EstimateDto.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['estimate'],
16
-            new EstimateType($data['type'])
15
+            $data[ 'estimate' ],
16
+            new EstimateType($data[ 'type' ])
17 17
         );
18 18
     }
19 19
 
Please login to merge, or discard this patch.
src/Api/Project/Project.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 ProjectDtoImpl[]
24 24
      */
25
-    public function projects(string $workspaceId, array $params = []): array
25
+    public function projects(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.