Passed
Push — master ( 323542...b3d3d7 )
by Frank
06:59 queued 02:19
created
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.
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.
docker/wp-config.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 
78 78
 /** Absolute path to the WordPress directory. */
79 79
 if ( ! defined( 'ABSPATH' ) )
80
-	define( 'ABSPATH', dirname( __FILE__ ) . '/' );
80
+    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
81 81
 
82 82
 /** Sets up WordPress vars and included files. */
83 83
 require_once ABSPATH . 'wp-settings.php';
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -20,22 +20,22 @@  discard block
 block discarded – undo
20 20
 
21 21
 // ** MySQL settings ** //
22 22
 /** The name of the database for WordPress */
23
-define( 'DB_NAME', 'wordpress' );
23
+define('DB_NAME', 'wordpress');
24 24
 
25 25
 /** MySQL database username */
26
-define( 'DB_USER', 'wordpress' );
26
+define('DB_USER', 'wordpress');
27 27
 
28 28
 /** MySQL database password */
29
-define( 'DB_PASSWORD', 'wordpress' );
29
+define('DB_PASSWORD', 'wordpress');
30 30
 
31 31
 /** MySQL hostname */
32
-define( 'DB_HOST', 'mariadb' );
32
+define('DB_HOST', 'mariadb');
33 33
 
34 34
 /** Database Charset to use in creating database tables. */
35
-define( 'DB_CHARSET', 'utf8' );
35
+define('DB_CHARSET', 'utf8');
36 36
 
37 37
 /** The Database Collate type. Don't change this if in doubt. */
38
-define( 'DB_COLLATE', '' );
38
+define('DB_COLLATE', '');
39 39
 
40 40
 /**
41 41
  * Authentication Unique Keys and Salts.
@@ -46,15 +46,15 @@  discard block
 block discarded – undo
46 46
  *
47 47
  * @since 2.6.0
48 48
  */
49
-define( 'AUTH_KEY',          'VZyXJ<Tl/+Mg]8HBx,PTW,5l|o;#vu[[e4FGFF|g]P^s4`0oiMw)qZo ~*$lV73q' );
50
-define( 'SECURE_AUTH_KEY',   '&xR- ]0G}(y-5Kb+D`:#%&c7NK]X;7,;_Wv)skugw~+U]nq`qey~OG|ZTxZ5c;=^' );
51
-define( 'LOGGED_IN_KEY',     'mO*CN/~&]y&A*3:$qfGM3Km/)?_6q!ph*znCSnWULl$vQ)exEC(bQ$|RNU1i{ 0w' );
52
-define( 'NONCE_KEY',         'YafY sgP+RAo~:0Lj#Rf$gP(i01N<:fI&ombS !| FfF@rAR%r,|RLos2nKxeq~E' );
53
-define( 'AUTH_SALT',         'rcRtXE::ax>_[{V:LR^WJzo juXti*q}A(!:)c4yi!U%C8oK/Z!A;p30l?LW+*8A' );
54
-define( 'SECURE_AUTH_SALT',  '3[qjnu<bnz|sEJLtR#}0n^VEf ^]rXcA[hRa2VDitLhsng>m$jNG|=uy{1x29J_x' );
55
-define( 'LOGGED_IN_SALT',    'Z}FU-B#c6W=l$WQ0Jw#(BRzDc@*/~LZxZ1;;*^ODa,Z>`r%<FuHmj_gyLepSn@V/' );
56
-define( 'NONCE_SALT',        'j_1pqvHVGF?6Ya[UX^O6efup}yU;sCbT%`dOEI@=Wv;faF5BuM1fwB64(Q*IDuA$' );
57
-define( 'WP_CACHE_KEY_SALT', ' yPByarc]!MHyu4S|HfR?oat*d$Umt)/XHUh_K,l%mJ^UT$DYy t@X}i,/j3lhv:' );
49
+define('AUTH_KEY', 'VZyXJ<Tl/+Mg]8HBx,PTW,5l|o;#vu[[e4FGFF|g]P^s4`0oiMw)qZo ~*$lV73q');
50
+define('SECURE_AUTH_KEY', '&xR- ]0G}(y-5Kb+D`:#%&c7NK]X;7,;_Wv)skugw~+U]nq`qey~OG|ZTxZ5c;=^');
51
+define('LOGGED_IN_KEY', 'mO*CN/~&]y&A*3:$qfGM3Km/)?_6q!ph*znCSnWULl$vQ)exEC(bQ$|RNU1i{ 0w');
52
+define('NONCE_KEY', 'YafY sgP+RAo~:0Lj#Rf$gP(i01N<:fI&ombS !| FfF@rAR%r,|RLos2nKxeq~E');
53
+define('AUTH_SALT', 'rcRtXE::ax>_[{V:LR^WJzo juXti*q}A(!:)c4yi!U%C8oK/Z!A;p30l?LW+*8A');
54
+define('SECURE_AUTH_SALT', '3[qjnu<bnz|sEJLtR#}0n^VEf ^]rXcA[hRa2VDitLhsng>m$jNG|=uy{1x29J_x');
55
+define('LOGGED_IN_SALT', 'Z}FU-B#c6W=l$WQ0Jw#(BRzDc@*/~LZxZ1;;*^ODa,Z>`r%<FuHmj_gyLepSn@V/');
56
+define('NONCE_SALT', 'j_1pqvHVGF?6Ya[UX^O6efup}yU;sCbT%`dOEI@=Wv;faF5BuM1fwB64(Q*IDuA$');
57
+define('WP_CACHE_KEY_SALT', ' yPByarc]!MHyu4S|HfR?oat*d$Umt)/XHUh_K,l%mJ^UT$DYy t@X}i,/j3lhv:');
58 58
 
59 59
 /**
60 60
  * WordPress Database Table prefix.
@@ -64,20 +64,20 @@  discard block
 block discarded – undo
64 64
  */
65 65
 $table_prefix = 'wp_';
66 66
 
67
-define( 'WP_ALLOW_MULTISITE', true );
68
-define( 'MULTISITE', true );
69
-define( 'SUBDOMAIN_INSTALL', false );
67
+define('WP_ALLOW_MULTISITE', true);
68
+define('MULTISITE', true);
69
+define('SUBDOMAIN_INSTALL', false);
70 70
 $base = '/';
71
-define( 'DOMAIN_CURRENT_SITE', 'multisite-global-media.docker' );
72
-define( 'PATH_CURRENT_SITE', '/' );
73
-define( 'SITE_ID_CURRENT_SITE', 1 );
74
-define( 'BLOG_ID_CURRENT_SITE', 1 );
71
+define('DOMAIN_CURRENT_SITE', 'multisite-global-media.docker');
72
+define('PATH_CURRENT_SITE', '/');
73
+define('SITE_ID_CURRENT_SITE', 1);
74
+define('BLOG_ID_CURRENT_SITE', 1);
75 75
 
76 76
 /* That's all, stop editing! Happy blogging. */
77 77
 
78 78
 /** Absolute path to the WordPress directory. */
79
-if ( ! defined( 'ABSPATH' ) )
80
-	define( 'ABSPATH', dirname( __FILE__ ) . '/' );
79
+if (!defined('ABSPATH'))
80
+	define('ABSPATH', dirname(__FILE__) . '/');
81 81
 
82 82
 /** Sets up WordPress vars and included files. */
83 83
 require_once ABSPATH . 'wp-settings.php';
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,8 +76,9 @@
 block discarded – undo
76 76
 /* That's all, stop editing! Happy blogging. */
77 77
 
78 78
 /** Absolute path to the WordPress directory. */
79
-if ( ! defined( 'ABSPATH' ) )
79
+if ( ! defined( 'ABSPATH' ) ) {
80 80
 	define( 'ABSPATH', dirname( __FILE__ ) . '/' );
81
+}
81 82
 
82 83
 /** Sets up WordPress vars and included files. */
83 84
 require_once ABSPATH . 'wp-settings.php';
Please login to merge, or discard this patch.