@@ -45,7 +45,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -21,7 +21,7 @@ discard block |
||
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 |
||
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 | } |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 | } |
@@ -20,7 +20,7 @@ discard block |
||
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 |
||
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 | } |
@@ -26,7 +26,7 @@ discard block |
||
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 |
||
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> |