Skip to content

Commit

Permalink
Code Review Compat Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
theodesp committed Jan 2, 2024
1 parent 01061d1 commit 919859e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions includes/Blocks/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ private function register_block_attributes_as_fields(): void {
* @param string $name The block name
* @param object $attribute The block attribute config
* @param string $prefix Current prefix string to use for the get_query_type
*
* @return mixed
*/
private function get_attribute_type( $name, $attribute, $prefix ): mixed {
private function get_attribute_type( $name, $attribute, $prefix ) {
$type = null;

if ( isset( $attribute['type'] ) ) {
Expand Down Expand Up @@ -183,8 +185,8 @@ private function get_attribute_type( $name, $attribute, $prefix ): mixed {
/**
* Gets the WPGraphQL field registration config for the block attributes.
*
* @param ?array $block_attributes The block attributes.
* @param string $prefix The current prefix string to use for the get_query_type
* @param ?array $block_attributes The block attributes.
* @param string|null $prefix The current prefix string to use for the get_query_type
*
* @return array
*/
Expand Down Expand Up @@ -287,8 +289,10 @@ private function create_attributes_fields( $attributes, $prefix ): array {
*
* @param array|string $value The value
* @param string $type The type of the value
*
* @return mixed
*/
private function normalize_attribute_value( $value, $type ): mixed {
private function normalize_attribute_value( $value, $type ) {
switch ( $type ) {
case 'string':
return (string) $value;
Expand Down Expand Up @@ -433,8 +437,10 @@ private function resolve_block_attributes_recursive( $attributes, $html, $config
*
* @param string $html The html value
* @param string $source The source type
*
* @return string|null
*/
private function parse_single_source( $html, $source ): string|null {
private function parse_single_source( $html, $source ) {
$value = null;
if ( empty( $html ) ) {
return $value;
Expand Down

0 comments on commit 919859e

Please sign in to comment.