mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-02-03 23:42:47 +00:00
Docs: Improve PHPCS comments general consistency.
Props nekojonez. See #58833. git-svn-id: https://develop.svn.wordpress.org/trunk@56472 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
73f7ecce4c
commit
e0e36e63fe
@ -468,10 +468,10 @@ function _register_theme_block_patterns() {
|
||||
|
||||
// Translate the pattern metadata.
|
||||
$text_domain = $theme->get( 'TextDomain' );
|
||||
//phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
|
||||
// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
|
||||
$pattern_data['title'] = translate_with_gettext_context( $pattern_data['title'], 'Pattern title', $text_domain );
|
||||
if ( ! empty( $pattern_data['description'] ) ) {
|
||||
//phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
|
||||
// phpcs:ignore WordPress.WP.I18n.NonSingularStringLiteralText, WordPress.WP.I18n.NonSingularStringLiteralContext, WordPress.WP.I18n.NonSingularStringLiteralDomain, WordPress.WP.I18n.LowLevelTranslationFunction
|
||||
$pattern_data['description'] = translate_with_gettext_context( $pattern_data['description'], 'Pattern description', $text_domain );
|
||||
}
|
||||
|
||||
|
||||
@ -5144,7 +5144,7 @@ function _wp_to_kebab_case( $input_string ) {
|
||||
|
||||
preg_match_all( $regexp, str_replace( "'", '', $input_string ), $matches );
|
||||
return strtolower( implode( '-', $matches[0] ) );
|
||||
//phpcs:enable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
// phpcs:enable WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -118,7 +118,7 @@ function _delete_all_data() {
|
||||
$wpdb->term_relationships,
|
||||
$wpdb->termmeta,
|
||||
) as $table ) {
|
||||
//phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
$wpdb->query( "DELETE FROM {$table}" );
|
||||
}
|
||||
|
||||
@ -126,7 +126,7 @@ function _delete_all_data() {
|
||||
$wpdb->terms,
|
||||
$wpdb->term_taxonomy,
|
||||
) as $table ) {
|
||||
//phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
$wpdb->query( "DELETE FROM {$table} WHERE term_id != 1" );
|
||||
}
|
||||
|
||||
|
||||
@ -64,12 +64,12 @@ echo 'Installing...' . PHP_EOL;
|
||||
|
||||
$wpdb->query( 'SET foreign_key_checks = 0' );
|
||||
foreach ( $wpdb->tables() as $table => $prefixed_table ) {
|
||||
//phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
$wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" );
|
||||
}
|
||||
|
||||
foreach ( $wpdb->tables( 'ms_global' ) as $table => $prefixed_table ) {
|
||||
//phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
// phpcs:ignore WordPress.DB.PreparedSQL.InterpolatedNotPrepared
|
||||
$wpdb->query( "DROP TABLE IF EXISTS $prefixed_table" );
|
||||
|
||||
// We need to create references to ms global tables.
|
||||
|
||||
@ -69,7 +69,7 @@ abstract class WP_Test_XML_TestCase extends WP_UnitTestCase {
|
||||
* @param string $message Optional. Message to display when the assertion fails.
|
||||
*/
|
||||
public function assertXMLEquals( $expectedXml, $actualXml, $message = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
$this->assertSame( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
$this->assertSame( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,7 +86,7 @@ abstract class WP_Test_XML_TestCase extends WP_UnitTestCase {
|
||||
* @param string $actualXml
|
||||
* @param string $message Optional. Message to display when the assertion fails.
|
||||
*/
|
||||
public function assertXMLNotEquals( $expectedXml, $actualXml, $message = '' ) { //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
$this->assertNotEquals( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); //phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
public function assertXMLNotEquals( $expectedXml, $actualXml, $message = '' ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
$this->assertNotEquals( $this->normalizeXML( $expectedXml ), $this->normalizeXML( $actualXml ), $message ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user