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 ); } 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' ) );