Skip to content

Commit 0989d08

Browse files
committed
cs-lint should not be prefixed with an underscore to indicate visibility
1 parent 3757f9b commit 0989d08

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

admin/class-shifter-admin.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@ public function shifter_mail_from( $email_address ) {
137137
}
138138

139139
/**
140-
* @param string $url URL strings
140+
* Integrations between Shifter and Algolia Shared private function
141+
*
142+
* @param string $url URL strings.
141143
* @return string Replaced URL from Shifter WP to Shifter CDN
142144
*
143145
* @since 1.1.0
144146
*/
145-
private function _replace_url_to_public_domain( $url ) {
147+
private function replace_url_to_public_domain( $url ) {
146148
$replaced_domain = getenv( 'SHIFTER_DOMAIN' );
147149
if ( ! $replaced_domain ) {
148150
$replaced_domain = getenv( 'CF_DOMAIN' );
@@ -166,7 +168,7 @@ private function _replace_url_to_public_domain( $url ) {
166168
* @since 1.0.0
167169
*/
168170
public function replace_algolia_posts_permalink( $record ) {
169-
$record['permalink'] = $this->_replace_url_to_public_domain( $record['permalink'] );
171+
$record['permalink'] = $this->replace_url_to_public_domain( $record['permalink'] );
170172
return $record;
171173
}
172174
/**
@@ -177,7 +179,7 @@ public function replace_algolia_posts_permalink( $record ) {
177179
* @since 1.1.0
178180
*/
179181
public function replace_algolia_terms_permalink( $record ) {
180-
$record['permalink'] = $this->_replace_url_to_public_domain( $record['permalink'] );
182+
$record['permalink'] = $this->replace_url_to_public_domain( $record['permalink'] );
181183
return $record;
182184
}
183185

@@ -189,7 +191,7 @@ public function replace_algolia_terms_permalink( $record ) {
189191
* @since 1.1.0
190192
*/
191193
public function replace_algolia_users_posts_url( $record ) {
192-
$record['posts_url'] = $this->_replace_url_to_public_domain( $record['posts_url'] );
194+
$record['posts_url'] = $this->replace_url_to_public_domain( $record['posts_url'] );
193195
return $record;
194196
}
195197

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"phpcbf . -pwv --ignore=vendor,node_modules,volume --extensions=php --standard=WordPress || git diff"
1919
],
2020
"cs-lint": [
21-
"phpcs . -p --ignore=vendor,node_modules --extensions=php --standard=WordPress"
21+
"phpcs . -p --ignore=vendor,node_modules,volume --extensions=php --standard=WordPress"
2222
]
2323
},
2424
"authors": [

0 commit comments

Comments
 (0)