Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phan: Fix more phpdocs #37042

Merged
merged 7 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions projects/packages/connection/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// PhanDeprecatedFunction : 15+ occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 15+ occurrences
// PhanTypeMismatchReturn : 15+ occurrences
// PhanUndeclaredClassMethod : 15+ occurrences
// PhanUndeclaredClassMethod : 10+ occurrences
// PhanTypeMismatchPropertyProbablyReal : 9 occurrences
// PhanNoopNew : 8 occurrences
// PhanTypeMismatchReturnProbablyReal : 8 occurrences
Expand All @@ -25,9 +25,7 @@
// PhanTypeMismatchDefault : 5 occurrences
// PhanTypeMismatchArgumentInternal : 3 occurrences
// PhanTypeMismatchArgumentNullable : 3 occurrences
// PhanTypeMismatchProperty : 3 occurrences
// PhanTypeObjectUnsetDeclaredProperty : 3 occurrences
// PhanUndeclaredTypeReturnType : 3 occurrences
// PhanCommentParamWithoutRealParam : 2 occurrences
// PhanNonClassMethodCall : 2 occurrences
// PhanPluginUnreachableCode : 2 occurrences
Expand All @@ -36,18 +34,14 @@
// PhanTypeMismatchReturnNullable : 2 occurrences
// PhanTypePossiblyInvalidDimOffset : 2 occurrences
// PhanUndeclaredMethodInCallable : 2 occurrences
// PhanUndeclaredTypeProperty : 2 occurrences
// PhanUndeclaredTypeThrowsType : 2 occurrences
// PhanUnextractableAnnotationSuffix : 2 occurrences
// PhanAccessMethodInternal : 1 occurrence
// PhanImpossibleCondition : 1 occurrence
// PhanImpossibleTypeComparison : 1 occurrence
// PhanPluginDuplicateAdjacentStatement : 1 occurrence
// PhanPluginSimplifyExpressionBool : 1 occurrence
// PhanTypeMismatchDeclaredParamNullable : 1 occurrence
// PhanTypeSuspiciousStringExpression : 1 occurrence
// PhanUndeclaredClassReference : 1 occurrence
// PhanUndeclaredFunctionInCallable : 1 occurrence
// PhanUnextractableAnnotationSuffix : 1 occurrence

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
Expand All @@ -58,28 +52,25 @@
'legacy/class-jetpack-xmlrpc-server.php' => ['PhanAccessMethodInternal', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDefault', 'PhanTypeMismatchReturn', 'PhanUndeclaredClassMethod', 'PhanUndeclaredProperty'],
'src/class-error-handler.php' => ['PhanTypeMismatchReturnProbablyReal'],
'src/class-heartbeat.php' => ['PhanTypeMismatchPropertyDefault'],
'src/class-manager.php' => ['PhanImpossibleCondition', 'PhanNoopNew', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDeclaredParamNullable', 'PhanTypeMismatchDefault', 'PhanTypeMismatchProperty', 'PhanTypeMismatchPropertyProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnNullable', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredTypeProperty', 'PhanUndeclaredTypeReturnType'],
'src/class-manager.php' => ['PhanImpossibleCondition', 'PhanNoopNew', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDeclaredParamNullable', 'PhanTypeMismatchDefault', 'PhanTypeMismatchPropertyProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnNullable', 'PhanTypeMismatchReturnProbablyReal'],
'src/class-nonce-handler.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchReturnNullable'],
'src/class-package-version-tracker.php' => ['PhanUndeclaredClassMethod'],
'src/class-partner-coupon.php' => ['PhanPluginDuplicateConditionalNullCoalescing'],
'src/class-partner.php' => ['PhanTypeMismatchPropertyProbablyReal'],
'src/class-plugin-storage.php' => ['PhanUndeclaredClassMethod'],
'src/class-rest-authentication.php' => ['PhanTypeMismatchPropertyDefault', 'PhanTypeMismatchPropertyProbablyReal'],
'src/class-rest-connector.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredTypeReturnType', 'PhanUnextractableAnnotationSuffix'],
'src/class-rest-connector.php' => ['PhanParamTooMany', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUnextractableAnnotationSuffix'],
'src/class-secrets.php' => ['PhanCommentParamWithoutRealParam', 'PhanNonClassMethodCall', 'PhanTypeMismatchArgument'],
'src/class-server-sandbox.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchArgument'],
'src/class-tokens.php' => ['PhanImpossibleTypeComparison', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal'],
'src/class-tracking.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDefault', 'PhanTypePossiblyInvalidDimOffset'],
'src/class-urls.php' => ['PhanTypeSuspiciousStringExpression', 'PhanUndeclaredFunctionInCallable'],
'src/class-webhooks.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'src/class-xmlrpc-connector.php' => ['PhanUndeclaredTypeReturnType'],
'src/sso/class-helpers.php' => ['PhanTypeMismatchArgumentProbablyReal'],
'src/sso/class-sso.php' => ['PhanNoopNew', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredClassMethod'],
'src/sso/class-user-admin.php' => ['PhanPluginUnreachableCode', 'PhanTypeMismatchArgument'],
'src/webhooks/class-authorize-redirect.php' => ['PhanTypeMismatchArgumentNullable', 'PhanTypeMismatchProperty', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassReference', 'PhanUndeclaredTypeProperty'],
'src/webhooks/class-authorize-redirect.php' => ['PhanTypeMismatchArgumentNullable', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassReference'],
'tests/php/test-class-nonce-handler.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanTypeMismatchArgument'],
'tests/php/test-class-plugin.php' => ['PhanUndeclaredTypeThrowsType'],
'tests/php/test-class-webhooks.php' => ['PhanDeprecatedFunction', 'PhanUndeclaredTypeThrowsType'],
'tests/php/test-class-webhooks.php' => ['PhanDeprecatedFunction'],
'tests/php/test-partner-coupon.php' => ['PhanDeprecatedFunction'],
'tests/php/test-rest-endpoints.php' => ['PhanNoopNew', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredMethodInCallable'],
'tests/php/test-tracking.php' => ['PhanDeprecatedFunction'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Fix a bunch of phpdocs to make Phan happier. No change to functionality.


6 changes: 3 additions & 3 deletions projects/packages/connection/src/class-client.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ public static function _wp_remote_request( $url, $args, $set_fallback = false )
/**
* Sets the time difference for correct signature computation.
*
* @param array $response Response array from `wp_remote_request`.
* @param bool $force_set whether to force setting the time difference.
* @phan-param _WP_Remote_Response_Array $response
* @param array|WP_Error $response Response array from `wp_remote_request`, or WP_Error on error.
* @param bool $force_set whether to force setting the time difference.
* @phan-param _WP_Remote_Response_Array|WP_Error $response
*/
public static function set_time_diff( &$response, $force_set = false ) {
$code = wp_remote_retrieve_response_code( $response );
Expand Down
16 changes: 9 additions & 7 deletions projects/packages/connection/src/class-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
use Automattic\Jetpack\Status\Host;
use Automattic\Jetpack\Terms_Of_Service;
use Automattic\Jetpack\Tracking;
use IXR_Error;
use Jetpack_IXR_Client;
use Jetpack_Options;
use Jetpack_XMLRPC_Server;
use WP_Error;
use WP_User;

Expand Down Expand Up @@ -160,16 +162,16 @@ public static function configure() {
*
* @since 1.25.0 Deprecate $is_active param.
*
* @param array $request_params incoming request parameters.
* @param bool $has_connected_owner Whether the site has a connected owner.
* @param bool $is_signed whether the signature check has been successful.
* @param \Jetpack_XMLRPC_Server $xmlrpc_server (optional) an instance of the server to use instead of instantiating a new one.
* @param array $request_params incoming request parameters.
* @param bool $has_connected_owner Whether the site has a connected owner.
* @param bool $is_signed whether the signature check has been successful.
* @param Jetpack_XMLRPC_Server $xmlrpc_server (optional) an instance of the server to use instead of instantiating a new one.
*/
public function setup_xmlrpc_handlers(
$request_params,
$has_connected_owner,
$is_signed,
\Jetpack_XMLRPC_Server $xmlrpc_server = null
Jetpack_XMLRPC_Server $xmlrpc_server = null
) {
add_filter( 'xmlrpc_blog_options', array( $this, 'xmlrpc_options' ), 1000, 2 );

Expand Down Expand Up @@ -204,7 +206,7 @@ public function setup_xmlrpc_handlers(
if ( $xmlrpc_server ) {
$this->xmlrpc_server = $xmlrpc_server;
} else {
$this->xmlrpc_server = new \Jetpack_XMLRPC_Server();
$this->xmlrpc_server = new Jetpack_XMLRPC_Server();
}

$this->require_jetpack_authentication();
Expand Down Expand Up @@ -2321,7 +2323,7 @@ public function public_xmlrpc_methods( $methods ) {
* Handles a getOptions XMLRPC method call.
*
* @param array $args method call arguments.
* @return an amended XMLRPC server options array.
* @return array|IXR_Error An amended XMLRPC server options array.
*/
public function jetpack_get_options( $args ) {
global $wp_xmlrpc_server;
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/connection/src/class-rest-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ public function verify_registration( WP_REST_Request $request ) {
*
* @param WP_REST_Request $request The request sent to the WP REST API.
*
* @return array|wp-error
* @return array|WP_Error
*/
public static function remote_authorize( $request ) {
$xmlrpc_server = new Jetpack_XMLRPC_Server();
Expand Down
4 changes: 2 additions & 2 deletions projects/packages/connection/src/class-urls.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public static function normalize_www_in_url( $option, $url_function ) {
/**
* Return URL with a normalized protocol.
*
* @param callable $callable Function to retrieve URL option.
* @param string $new_value URL Protocol to set URLs to.
* @param string $callable Function name that was used to retrieve URL option.
* @param string $new_value URL Protocol to set URLs to.
* @return string Normalized URL.
*/
public static function get_protocol_normalized_url( $callable, $new_value ) {
Expand Down
6 changes: 4 additions & 2 deletions projects/packages/connection/src/class-xmlrpc-connector.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Automattic\Jetpack\Connection;

use IXR_Error;
tbradsha marked this conversation as resolved.
Show resolved Hide resolved

/**
* Registers the XML-RPC methods for Connections.
*/
Expand Down Expand Up @@ -69,10 +71,10 @@ private function output( $data ) {
$code = -10520;
}

if ( ! class_exists( \IXR_Error::class ) ) {
if ( ! class_exists( IXR_Error::class ) ) {
require_once ABSPATH . WPINC . '/class-IXR.php';
}
return new \IXR_Error(
return new IXR_Error(
$code,
sprintf( 'Jetpack: [%s] %s', $data->get_error_code(), $data->get_error_message() )
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Authorize_Redirect {
/**
* The Connection Manager object.
*
* @var Manager
* @var \Automattic\Jetpack\Connection\Manager
*/
private $connection;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Test_Plugin extends TestCase {
* Initialization of the test class
*
* @before
* @throws MockEnabledException PHPUnit wasn't able to enable mock functions ¯\_(⊙︿⊙)_/¯.
*/
protected function set_up() {
Plugin_Storage::configure();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ class Test_Webhooks extends TestCase {
/**
* Setting up the testing environment.
*
* @throws \phpmock\MockEnabledException The mock exception.
*
* @before
*/
public function set_up() {
Expand Down
17 changes: 6 additions & 11 deletions projects/packages/forms/.phan/baseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,52 +9,47 @@
*/
return [
// # Issue statistics:
// PhanTypeMismatchArgument : 30+ occurrences
// PhanUndeclaredClassMethod : 30+ occurrences
// PhanTypeMismatchArgument : 20+ occurrences
// PhanPluginDuplicateConditionalNullCoalescing : 10+ occurrences
// PhanUndeclaredMethod : 10+ occurrences
// PhanTypeMismatchReturnProbablyReal : 9 occurrences
// PhanTypeMismatchArgumentInternal : 7 occurrences
// PhanUndeclaredClassProperty : 7 occurrences
// PhanUndeclaredClassMethod : 7 occurrences
// PhanTypeMismatchArgumentProbablyReal : 6 occurrences
// PhanDeprecatedFunction : 5 occurrences
// PhanRedundantCondition : 4 occurrences
// PhanUndeclaredTypeParameter : 4 occurrences
// PhanTypeMismatchReturn : 3 occurrences
// PhanTypePossiblyInvalidDimOffset : 3 occurrences
// PhanUnextractableAnnotationElementName : 3 occurrences
// PhanPluginRedundantAssignment : 2 occurrences
// PhanTypeConversionFromArray : 2 occurrences
// PhanTypeMismatchArgumentNullableInternal : 2 occurrences
// PhanUndeclaredFunction : 2 occurrences
// PhanUndeclaredTypeReturnType : 2 occurrences
// PhanParamTooMany : 1 occurrence
// PhanPluginDuplicateAdjacentStatement : 1 occurrence
// PhanPluginMixedKeyNoKey : 1 occurrence
// PhanPossiblyNullTypeMismatchProperty : 1 occurrence
// PhanPossiblyUndeclaredVariable : 1 occurrence
// PhanTypeArraySuspiciousNullable : 1 occurrence
// PhanTypeMismatchProperty : 1 occurrence
// PhanTypeMismatchPropertyProbablyReal : 1 occurrence
// PhanTypeMismatchReturnNullable : 1 occurrence
// PhanUndeclaredConstant : 1 occurrence
// PhanUndeclaredProperty : 1 occurrence
// PhanUndeclaredTypeProperty : 1 occurrence
// PhanUnreferencedUseNormal : 1 occurrence

// Currently, file_suppressions and directory_suppressions are the only supported suppressions
'file_suppressions' => [
'src/blocks/contact-form/class-contact-form-block.php' => ['PhanUndeclaredClassMethod', 'PhanUndeclaredFunction'],
'src/class-wpcom-rest-api-v2-endpoint-forms.php' => ['PhanTypePossiblyInvalidDimOffset', 'PhanUndeclaredFunction'],
'src/contact-form/class-admin.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanPossiblyUndeclaredVariable', 'PhanRedundantCondition', 'PhanTypeArraySuspiciousNullable', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanUndeclaredClassMethod'],
'src/contact-form/class-contact-form-field.php' => ['PhanParamTooMany', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeConversionFromArray', 'PhanTypeMismatchArgument', 'PhanTypeMismatchPropertyProbablyReal', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredProperty'],
'src/contact-form/class-contact-form-field.php' => ['PhanParamTooMany', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanPossiblyNullTypeMismatchProperty', 'PhanTypeConversionFromArray', 'PhanTypeMismatchArgument', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredProperty'],
'src/contact-form/class-contact-form-plugin.php' => ['PhanPluginDuplicateAdjacentStatement', 'PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginRedundantAssignment', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchReturn', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod'],
'src/contact-form/class-contact-form-shortcode.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanTypeMismatchReturnProbablyReal'],
'src/contact-form/class-contact-form.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginRedundantAssignment', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty', 'PhanTypeMismatchReturnNullable', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassProperty', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeProperty', 'PhanUnextractableAnnotationElementName'],
'src/contact-form/class-contact-form.php' => ['PhanPluginDuplicateConditionalNullCoalescing', 'PhanPluginRedundantAssignment', 'PhanRedundantCondition', 'PhanTypeMismatchArgument', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchReturnNullable', 'PhanTypeMismatchReturnProbablyReal', 'PhanUndeclaredClassMethod', 'PhanUnextractableAnnotationElementName'],
'src/dashboard/class-dashboard-view-switch.php' => ['PhanUnreferencedUseNormal'],
'src/dashboard/class-dashboard.php' => ['PhanUndeclaredClassMethod', 'PhanUndeclaredConstant'],
'src/service/class-google-drive.php' => ['PhanTypeMismatchReturnProbablyReal'],
'tests/php/contact-form/test-class.contact-form-plugin.php' => ['PhanPluginMixedKeyNoKey'],
'tests/php/contact-form/test-class.contact-form.php' => ['PhanDeprecatedFunction', 'PhanTypeMismatchArgument', 'PhanUndeclaredClassMethod', 'PhanUndeclaredClassProperty', 'PhanUndeclaredTypeParameter', 'PhanUndeclaredTypeReturnType'],
'tests/php/contact-form/test-class.contact-form.php' => ['PhanDeprecatedFunction', 'PhanUndeclaredMethod'],
],
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
// (directory_suppressions will currently be ignored by subsequent calls to --save-baseline, but may be preserved in future Phan releases)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Fix a bunch of phpdocs to make Phan happier. No change to functionality.


Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Contact_Form_Field extends Contact_Form_Shortcode {
/**
* Default or POSTed value.
*
* @var string
* @var string|string[]
*/
public $value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Automattic\Jetpack\Forms\ContactForm;

use Automattic\Jetpack\Sync\Settings;
use PHPMailer\PHPMailer\PHPMailer;
use WP_Error;

/**
Expand Down Expand Up @@ -49,7 +50,7 @@ class Contact_Form extends Contact_Form_Shortcode {
/**
* Form we are currently looking at. If processed, will become $last
*
* @var Whatever
* @var Contact_Form
*/
public static $current_form;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace Automattic\Jetpack\Forms\ContactForm;

use DOMDocument;
use DOMElement;
use WorDBless\BaseTestCase;
use WorDBless\Posts;

Expand Down Expand Up @@ -928,23 +930,24 @@ public function render_field( $attributes ) {
* @return DOMElement The first div element.
*/
public function getCommonDiv( $html ) {
$doc = new \DOMDocument();
$doc = new DOMDocument();
$doc->loadHTML( $html );
return $this->getFirstElement( $doc, 'div' );
}

/**
* Gets the first element in the given DOMDocument object.
*
* @param DOMDocument $dom The DOMDocument object.
* @param string $tag The tag name.
* @param int $index The index.
* @param DOMDocument|DOMElement $dom The DOMDocument object.
* @param string $tag The tag name.
* @param int $index The index.
*
* @return DOMElement The first element with the given tag.
* @return DOMElement|null The first element with the given tag.
*/
public function getFirstElement( $dom, $tag, $index = 0 ) {
$elements = $dom->getElementsByTagName( $tag );
return $elements->item( $index );
$element = $elements->item( $index );
return $element instanceof DOMElement ? $element : null;
}

/**
Expand Down Expand Up @@ -981,7 +984,7 @@ public function assertFieldLabel( $wrapper_div, $attributes, $tag_name = 'label'
$expected = 'date' === $type ? $attributes['label'] . ' ' . $attributes['format'] : $attributes['label'];

// phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
$this->assertEquals( $expected, trim( $label->nodeValue ), 'Label is not what we expect it to be...' );
$this->assertEquals( $expected, trim( (string) $label->nodeValue ), 'Label is not what we expect it to be...' );
}

/**
Expand Down
Loading
Loading