Skip to content

Commit ef5a9df

Browse files
committed
Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations.
See #47632 git-svn-id: https://develop.svn.wordpress.org/trunk@45580 602fd350-edb4-49c9-b593-d223f7449a82
1 parent d2c4198 commit ef5a9df

26 files changed

Lines changed: 50 additions & 43 deletions

src/wp-admin/includes/file.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1720,7 +1720,7 @@ function copy_dir( $from, $to, $skip_list = array() ) {
17201720
* @param bool $allow_relaxed_file_ownership Optional. Whether to allow Group/World writable. Default false.
17211721
* @return bool|null True on success, false on failure, null if the filesystem method class file does not exist.
17221722
*/
1723-
function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) {
1723+
function WP_Filesystem( $args = false, $context = false, $allow_relaxed_file_ownership = false ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
17241724
global $wp_filesystem;
17251725

17261726
require_once( ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php' );

src/wp-admin/includes/misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ function iis7_add_rewrite_rule( $filename, $rewrite_rule ) {
831831
* @param DOMDocument $doc
832832
* @param string $filename
833833
*/
834-
function saveDomDocument( $doc, $filename ) {
834+
function saveDomDocument( $doc, $filename ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
835835
$config = $doc->saveXML();
836836
$config = preg_replace( "/([^\r])\n/", "$1\r\n", $config );
837837
$fp = fopen( $filename, 'w' );

src/wp-admin/includes/upgrade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2453,7 +2453,7 @@ function get_alloptions_110() {
24532453
* @param string $setting Option name.
24542454
* @return mixed
24552455
*/
2456-
function __get_option( $setting ) {
2456+
function __get_option( $setting ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
24572457
global $wpdb;
24582458

24592459
if ( $setting == 'home' && defined( 'WP_HOME' ) ) {
@@ -2522,7 +2522,7 @@ function deslash( $content ) {
25222522
* Default true.
25232523
* @return array Strings containing the results of the various update queries.
25242524
*/
2525-
function dbDelta( $queries = '', $execute = true ) {
2525+
function dbDelta( $queries = '', $execute = true ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
25262526
global $wpdb;
25272527

25282528
if ( in_array( $queries, array( '', 'all', 'blog', 'global', 'ms_global' ), true ) ) {

src/wp-admin/link-parse-opml.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @param string $tagName XML element name.
3232
* @param array $attrs XML element attributes.
3333
*/
34-
function startElement( $parser, $tagName, $attrs ) {
34+
function startElement( $parser, $tagName, $attrs ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
3535
global $names, $urls, $targets, $descriptions, $feeds;
3636

3737
if ( 'OUTLINE' === $tagName ) {
@@ -68,7 +68,7 @@ function startElement( $parser, $tagName, $attrs ) {
6868
* @param mixed $parser XML Parser resource.
6969
* @param string $tagName XML tag name.
7070
*/
71-
function endElement( $parser, $tagName ) {
71+
function endElement( $parser, $tagName ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
7272
// Nothing to do.
7373
}
7474

src/wp-includes/author-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,6 @@ function is_multi_author() {
563563
* @since 3.2.0
564564
* @access private
565565
*/
566-
function __clear_multi_author_cache() {
566+
function __clear_multi_author_cache() { //phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionDoubleUnderscore
567567
delete_transient( 'is_multi_author' );
568568
}

src/wp-includes/category-template.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function get_the_category( $id = false ) {
105105
* @param int $cat_ID Category ID.
106106
* @return string|WP_Error Category name on success, WP_Error on failure.
107107
*/
108-
function get_the_category_by_ID( $cat_ID ) {
108+
function get_the_category_by_ID( $cat_ID ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
109109
$cat_ID = (int) $cat_ID;
110110
$category = get_term( $cat_ID );
111111

src/wp-includes/category.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ function get_category_by_slug( $slug ) {
197197
* @param string $cat_name Category name.
198198
* @return int 0, if failure and ID of category on success.
199199
*/
200-
function get_cat_ID( $cat_name ) {
200+
function get_cat_ID( $cat_name ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
201201
$cat = get_term_by( 'name', $cat_name, 'category' );
202202
if ( $cat ) {
203203
return $cat->term_id;

src/wp-includes/class-http.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ public function head( $url, $args = array() ) {
647647
* @param string $strResponse The full response string
648648
* @return array Array with 'headers' and 'body' keys.
649649
*/
650-
public static function processResponse( $strResponse ) {
650+
public static function processResponse( $strResponse ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
651651
$res = explode( "\r\n\r\n", $strResponse, 2 );
652652

653653
return array(
@@ -669,7 +669,7 @@ public static function processResponse( $strResponse ) {
669669
* @return array Processed string headers. If duplicate headers are encountered,
670670
* Then a numbered array is returned as the value of that header-key.
671671
*/
672-
public static function processHeaders( $headers, $url = '' ) {
672+
public static function processHeaders( $headers, $url = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
673673
// Split headers, one per array element.
674674
if ( is_string( $headers ) ) {
675675
// Tolerate line terminator: CRLF = LF (RFC 2616 19.3).
@@ -752,7 +752,7 @@ public static function processHeaders( $headers, $url = '' ) {
752752
*
753753
* @param array $r Full array of args passed into ::request()
754754
*/
755-
public static function buildCookieHeader( &$r ) {
755+
public static function buildCookieHeader( &$r ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
756756
if ( ! empty( $r['cookies'] ) ) {
757757
// Upgrade any name => value cookie pairs to WP_HTTP_Cookie instances.
758758
foreach ( $r['cookies'] as $name => $value ) {
@@ -788,7 +788,7 @@ public static function buildCookieHeader( &$r ) {
788788
* @param string $body Body content
789789
* @return string Chunked decoded body on success or raw body on failure.
790790
*/
791-
public static function chunkTransferDecode( $body ) {
791+
public static function chunkTransferDecode( $body ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
792792
// The body is not chunked encoded or is malformed.
793793
if ( ! preg_match( '/^([0-9a-f]+)[^\r\n]*\r\n/i', trim( $body ) ) ) {
794794
return $body;

src/wp-includes/class-wp-http-cookie.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public function test( $url ) {
211211
*
212212
* @return string Header encoded cookie name and value.
213213
*/
214-
public function getHeaderValue() {
214+
public function getHeaderValue() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
215215
if ( ! isset( $this->name ) || ! isset( $this->value ) ) {
216216
return '';
217217
}
@@ -234,7 +234,7 @@ public function getHeaderValue() {
234234
*
235235
* @return string
236236
*/
237-
public function getFullHeader() {
237+
public function getFullHeader() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
238238
return 'Cookie: ' . $this->getHeaderValue();
239239
}
240240

src/wp-includes/class-wp-http-response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public function set_data( $data ) {
147147
*
148148
* @return mixed Any JSON-serializable value.
149149
*/
150-
public function jsonSerialize() {
150+
public function jsonSerialize() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.MethodNameInvalid
151151
return $this->get_data();
152152
}
153153
}

0 commit comments

Comments
 (0)