Passed
Pull Request — master (#100)
by Guido
05:27
created
src/Rest/Rest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -78,8 +78,8 @@
 block discarded – undo
78 78
         }
79 79
 
80 80
         $idPrefix = $this->site->idSitePrefix();
81
-        $attachmentId = (int)$request[self::REST_FIELD_THUMBNAIL_ID];
82
-        $postId = (int)$request['id'];
81
+        $attachmentId = (int) $request[self::REST_FIELD_THUMBNAIL_ID];
82
+        $postId = (int) $request['id'];
83 83
         if ($attachmentId && $this->idPrefixIncludedInAttachmentId($attachmentId, $idPrefix)) {
84 84
             update_post_meta($postId, self::META_KEY_THUMBNAIL_ID, $attachmentId);
85 85
 
Please login to merge, or discard this patch.
src/Rest/RestController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         // phpcs:enable
58 58
         $idPrefix = $this->site->idSitePrefix();
59 59
 
60
-        if (!$this->idPrefixIncludedInAttachmentId((int)$request['id'], $idPrefix)) {
60
+        if (!$this->idPrefixIncludedInAttachmentId((int) $request['id'], $idPrefix)) {
61 61
             return parent::get_item_permissions_check($request);
62 62
         }
63 63
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $requestClone = clone $request;
66 66
         $requestClone['id'] = $this->stripSiteIdPrefixFromAttachmentId(
67 67
             $idPrefix,
68
-            (int)$request['id']
68
+            (int) $request['id']
69 69
         );
70 70
 
71 71
         $this->siteSwitcher->switchToBlog($this->site->id());
@@ -88,11 +88,11 @@  discard block
 block discarded – undo
88 88
         // phpcs:enable
89 89
         $idPrefix = $this->site->idSitePrefix();
90 90
 
91
-        if (!$this->idPrefixIncludedInAttachmentId((int)$request['id'], $idPrefix)) {
91
+        if (!$this->idPrefixIncludedInAttachmentId((int) $request['id'], $idPrefix)) {
92 92
             return parent::get_item($request);
93 93
         }
94 94
 
95
-        $attachmentId = (int)$request['id'];
95
+        $attachmentId = (int) $request['id'];
96 96
         $request['id'] = $this->stripSiteIdPrefixFromAttachmentId($idPrefix, $attachmentId);
97 97
         $this->siteSwitcher->switchToBlog($this->site->id());
98 98
         $response = parent::get_item($request);
Please login to merge, or discard this patch.