Skip to content
Open
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
4 changes: 2 additions & 2 deletions includes/Dependencies/GoDaddy/Styles/StylesLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't assume you would want to set an instance as null, so I just removed the default null value instead of explicitly setting nullable in the StylesLoader.

return static::$instance = $instance;
}

Expand Down
8 changes: 4 additions & 4 deletions includes/block-migrate/class-coblocks-block-migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,23 @@ 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 );
}

/**
* 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 );
}

Expand Down
2 changes: 1 addition & 1 deletion includes/class-coblocks-site-design.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) );
Expand Down
Loading