Test Setup Failed
Branch master (d11f39)
by Frank
05:02
created
Category
src/Thumbnail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $idPrefix = $this->site->idSitePrefix();
47 47
 
48
-        $attachmentId = (int)filter_input(
48
+        $attachmentId = (int) filter_input(
49 49
             INPUT_POST,
50 50
             self::META_KEY_THUMBNAIL_ID,
51 51
             FILTER_SANITIZE_NUMBER_INT
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         // phpcs:enable
112 112
 
113
-        $attachmentId = (int)$attachmentId;
113
+        $attachmentId = (int) $attachmentId;
114 114
         $idPrefix = $this->site->idSitePrefix();
115 115
 
116 116
         if (false === $this->idPrefixIncludedInAttachmentId($attachmentId, $idPrefix)) {
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 
173 173
         // phpcs:enable
174 174
 
175
-        $attachmentId = (int)$attachmentId;
175
+        $attachmentId = (int) $attachmentId;
176 176
         $siteId = $this->site->id();
177 177
         $idPrefix = $this->site->idSitePrefix();
178 178
 
Please login to merge, or discard this patch.
src/Site.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function id(): int
23 23
     {
24
-        return (int)apply_filters(self::SITE_ID, 1);
24
+        return (int) apply_filters(self::SITE_ID, 1);
25 25
     }
26 26
 
27 27
     /**
@@ -45,6 +45,6 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function isMediaSite(): bool
47 47
     {
48
-        return ($this->id() === (int)$GLOBALS['current_blog']->blog_id);
48
+        return ($this->id() === (int) $GLOBALS['current_blog']->blog_id);
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Attachment.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $idPrefix = $this->site->idSitePrefix();
49 49
 
50
-        $response['id'] = (int) ($idPrefix.$response['id']); // Unique ID, must be a number.
50
+        $response['id'] = (int) ($idPrefix . $response['id']); // Unique ID, must be a number.
51 51
         $response['nonces']['update'] = false;
52 52
         $response['nonces']['edit'] = false;
53 53
         $response['nonces']['delete'] = false;
@@ -147,10 +147,10 @@  discard block
 block discarded – undo
147 147
     public function mediaSendToEditor(string $html, int $id): string
148 148
     {
149 149
         $idPrefix = $this->site->idSitePrefix();
150
-        $newId = $idPrefix.$id; // Unique ID, must be a number.
150
+        $newId = $idPrefix . $id; // Unique ID, must be a number.
151 151
 
152
-        $search = 'wp-image-'.$id;
153
-        $replace = 'wp-image-'.$newId;
152
+        $search = 'wp-image-' . $id;
153
+        $replace = 'wp-image-' . $newId;
154 154
 
155 155
         return str_replace($search, $replace, $html);
156 156
     }
Please login to merge, or discard this patch.
src/Helper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         string $siteIdPrefix
21 21
     ): bool {
22 22
 
23
-        return false !== strpos((string)$attachmentId, $siteIdPrefix);
23
+        return false !== strpos((string) $attachmentId, $siteIdPrefix);
24 24
     }
25 25
 
26 26
     /**
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
      */
33 33
     private function stripSiteIdPrefixFromAttachmentId(string $idPrefix, int $attachmentId): int
34 34
     {
35
-        return (int)str_replace($idPrefix, '', (string)$attachmentId);
35
+        return (int) str_replace($idPrefix, '', (string) $attachmentId);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
multisite-global-media.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // phpcs:disable
27 27
 
28 28
 $bootstrap = \Closure::bind(
29
-    static function () {
29
+    static function() {
30 30
     /**
31 31
      * @param string $message
32 32
      * @param string $noticeType
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         add_action(
40 40
             'admin_notices',
41
-            function () use ($message, $noticeType, $allowedMarkup) {
41
+            function() use ($message, $noticeType, $allowedMarkup) {
42 42
                 ?>
43 43
                 <div class="notice notice-<?= esc_attr($noticeType) ?>">
44 44
                     <p><?= wp_kses($message, $allowedMarkup) ?></p>
Please login to merge, or discard this patch.