Passed
Push — main ( af8633...13a630 )
by Artem
02:20
created
src/Entity/ContentHistory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         Assert::keyExists($data['lastUpdated'], 'by');
38 38
         Assert::isArray($data['lastUpdated']['by']);
39 39
 
40
-        if(isset($data['latest'])) {
40
+        if (isset($data['latest'])) {
41 41
             Assert::boolean($data['latest']);
42 42
             $contentHistory->setLatest($data['latest']);
43 43
         }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
         $contentHistory->setLastVersionNumber($data['lastUpdated']['number']);
52 52
 
53
-        if(isset($data['previousVersion'])) {
53
+        if (isset($data['previousVersion'])) {
54 54
             Assert::isArray($data['previousVersion']);
55 55
             Assert::keyExists($data['previousVersion'], 'number');
56 56
             $contentHistory->setPreviousVersionNumber($data['previousVersion']['number']);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     private static function getDateTimeFromString(string $dateString): DateTimeInterface
66 66
     {
67 67
         $dateTimeImmutable = DateTimeImmutable::createFromFormat('Y-m-d\TH:i:s.vZ', $dateString);
68
-        if($dateTimeImmutable === false) {
68
+        if ($dateTimeImmutable === false) {
69 69
             throw new HydrationException('Invalid date string: ' . $dateString);
70 70
         }
71 71
 
Please login to merge, or discard this patch.
src/Entity/ContentSearchResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $searchResult->setSize($data['size']);
42 42
 
43
-        if(isset($data['start']) && isset($data['limit'])) {
43
+        if (isset($data['start']) && isset($data['limit'])) {
44 44
             Assert::integer($data['start']);
45 45
             Assert::integer($data['limit']);
46 46
             $searchResult->setStart($data['start']);
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
 
59 59
         /* if there is a next link, then it is not the last page */
60
-        if(isset($data['_links']['next'])) {
60
+        if (isset($data['_links']['next'])) {
61 61
             $searchResult->setLastPage(false);
62 62
         }
63 63
 
Please login to merge, or discard this patch.
src/Api/Content.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,17 +84,17 @@  discard block
 block discarded – undo
84 84
     public function find(array $searchParameter, ?int $limit = null, ?int $start = null): ContentSearchResult
85 85
     {
86 86
         $allowedSearchParameter = ['title', 'spaceKey', 'type', 'id'];
87
-        $queryParameter = array_filter($searchParameter, static function (string $searchKey) use ($allowedSearchParameter) {
87
+        $queryParameter = array_filter($searchParameter, static function(string $searchKey) use ($allowedSearchParameter) {
88 88
             return in_array($searchKey, $allowedSearchParameter, true);
89 89
         }, ARRAY_FILTER_USE_KEY);
90 90
 
91 91
         $queryParameter['expand'] = self::DEFAULT_EXPAND;
92 92
 
93
-        if($limit !== null) {
93
+        if ($limit !== null) {
94 94
             $queryParameter['limit'] = $limit;
95 95
         }
96 96
 
97
-        if($start !== null) {
97
+        if ($start !== null) {
98 98
             $queryParameter['start'] = $start;
99 99
         }
100 100
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         ];
162 162
 
163 163
         if (count($content->getAncestors()) > 0) {
164
-            $ancestorsData = array_map(static function (int $id) {
164
+            $ancestorsData = array_map(static function(int $id) {
165 165
                 return ['id' => $id];
166 166
             }, $content->getAncestors());
167 167
 
Please login to merge, or discard this patch.