Skip to content

Commit

Permalink
code style
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Dec 4, 2023
1 parent 972a319 commit bec0140
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,7 @@ public static function getFunctionParams( FunctionParamsProviderEvent $event ) :
$hook_types = $is_invoke ? $hook_types : array_slice( $hook_types, 0, $required_params_count );

// if the required args in add_action are higher than what the hook is called with in some cases
if ( $required_params_count > $hook['minimum_invoke_args'] && !$is_invoke ) {
if ( $required_params_count > $hook['minimum_invoke_args'] && ! $is_invoke ) {
// all args that go above the minimum invoke args must be set to optional, as the filter is called
// only after we sliced above already (since we need to include all params, just need to change if they're optional or not)
$required_params_count = $hook['minimum_invoke_args'];
Expand Down Expand Up @@ -1083,7 +1083,7 @@ protected static function getTypeFromArg( $parser_param, Context $context, State
$statements_source,
);

if ( !$mode_type && $parser_param instanceof PhpParser\Node\Expr\ConstFetch ) {
if ( ! $mode_type && $parser_param instanceof PhpParser\Node\Expr\ConstFetch ) {
$mode_type = ConstFetchAnalyzer::getConstType(
$statements_source,
$parser_param->name->toString(),
Expand All @@ -1102,7 +1102,7 @@ protected static function getTypeFromArg( $parser_param, Context $context, State
$statements_source,
);

if ( !$extended_var_id ) {
if ( ! $extended_var_id ) {
return null;
}

Expand Down Expand Up @@ -1147,7 +1147,7 @@ public static function registerHook( string $hook_name, array $types, string $ho
break;
}

if ( !$param_type->isSingle() ) {
if ( ! $param_type->isSingle() ) {
continue;
}

Expand Down Expand Up @@ -1361,7 +1361,7 @@ public function enterNode( PhpParser\Node $node ) {
$hook_name = Plugin::getDynamicHookName( $node->args[0]->value );
}

if (!$hook_name) {
if ( ! $hook_name ) {
$this->last_doc = null;
return null;
}
Expand All @@ -1388,7 +1388,7 @@ public function enterNode( PhpParser\Node $node ) {
$hook_name = Plugin::getDynamicHookName( $node->args[ $hook_index ]->value );
}

if (!$hook_name) {
if ( ! $hook_name ) {
$this->last_doc = null;
return null;
}
Expand Down Expand Up @@ -1442,7 +1442,7 @@ public function enterNode( PhpParser\Node $node ) {
$hook_name = Plugin::getDynamicHookName( $node->args[0]->value );
}

if (!$hook_name) {
if ( ! $hook_name ) {
$this->last_doc = null;
return null;
}
Expand Down

0 comments on commit bec0140

Please sign in to comment.