From 5276866a1bb395bf1b435962cd8642a42e4d4644 Mon Sep 17 00:00:00 2001 From: Austin Passy <367897+thefrosty@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:33:30 -0800 Subject: [PATCH 1/2] __construct cannot return a value. --- includes/class-coblocks-site-design.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-coblocks-site-design.php b/includes/class-coblocks-site-design.php index a0fed8047db..7d676db1c9a 100644 --- a/includes/class-coblocks-site-design.php +++ b/includes/class-coblocks-site-design.php @@ -77,7 +77,7 @@ public function __construct() { // short-circuit. if ( $this->short_circuit_check() ) { - return array(); + return; } add_action( 'wp_ajax_site_design_update_design_style', array( $this, 'design_endpoint_ajax' ) ); From 6462e97304d4ffa3f5aba229870a8f3dac2f9b9a Mon Sep 17 00:00:00 2001 From: Austin Passy <367897+thefrosty@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:34:44 -0800 Subject: [PATCH 2/2] Implicitly marking parameter as nullable is deprecated, the explicit nullable type must be used instead --- includes/Dependencies/GoDaddy/Styles/StylesLoader.php | 4 ++-- includes/block-migrate/class-coblocks-block-migration.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/Dependencies/GoDaddy/Styles/StylesLoader.php b/includes/Dependencies/GoDaddy/Styles/StylesLoader.php index c9adeb65389..291316cc9ff 100644 --- a/includes/Dependencies/GoDaddy/Styles/StylesLoader.php +++ b/includes/Dependencies/GoDaddy/Styles/StylesLoader.php @@ -62,10 +62,10 @@ public static function getInstance() { /** * Set the instance. * - * @param StylesLoader|null $instance + * @param StylesLoader $instance * @return StylesLoader|static */ - public static function setInstance( StylesLoader $instance = null ) { + public static function setInstance( StylesLoader $instance ) { return static::$instance = $instance; } diff --git a/includes/block-migrate/class-coblocks-block-migration.php b/includes/block-migrate/class-coblocks-block-migration.php index e4e9166df8a..a66ecd5840b 100644 --- a/includes/block-migrate/class-coblocks-block-migration.php +++ b/includes/block-migrate/class-coblocks-block-migration.php @@ -195,11 +195,11 @@ function( $attribute ) use ( $element ) { * Evaluates the given XPath expression and returns the full DOMNodeList. * * @param string $expression The XPath expression to execute. - * @param DOMNode $context_node The optional context_node can be specified for doing relative XPath queries. + * @param DOMNode|null $context_node The optional context_node can be specified for doing relative XPath queries. * * @return DOMNodeList|false all nodes matching the given XPath expression. */ - protected function query_selector_all( $expression, DOMNode $context_node = null ) { + protected function query_selector_all( $expression, ?DOMNode $context_node = null ) { return empty( $this->xpath ) ? new DOMNodeList() : $this->xpath->query( $expression, $context_node ); } @@ -207,11 +207,11 @@ protected function query_selector_all( $expression, DOMNode $context_node = null * Evaluates the given XPath expression and returns the node at the first position in the DOMNodeList. * * @param string $expression The XPath expression to execute. - * @param DOMNode $context_node The optional context_node can be specified for doing relative XPath queries. + * @param DOMNode|null $context_node The optional context_node can be specified for doing relative XPath queries. * * @return DOMNode|null The node at the first position in the DOMNodeList, or null if that is not a valid index. */ - protected function query_selector( $expression, DOMNode $context_node = null ) { + protected function query_selector( $expression, ?DOMNode $context_node = null ) { return $this->query_selector_all( $expression, $context_node )->item( 0 ); }