Automattic\WooCommerce\Vendor\GraphQL\Utils
BreakingChangesFinder::findAddedArgsForDirective
Method of the class: BreakingChangesFinder{}
No Hooks.
Returns
Array
Usage
$result = BreakingChangesFinder::findAddedArgsForDirective( $oldDirective, $newDirective ): array;
BreakingChangesFinder::findAddedArgsForDirective() BreakingChangesFinder::findAddedArgsForDirective code WC 10.9.1
public static function findAddedArgsForDirective(Directive $oldDirective, Directive $newDirective): array
{
$addedArgs = [];
$oldArgMap = self::getArgumentMapForDirective($oldDirective);
foreach ($newDirective->args as $arg) {
if (! isset($oldArgMap[$arg->name])) {
$addedArgs[] = $arg;
}
}
return $addedArgs;
}