Automator_Utilities::remove_duplicate_token_ids( $tokens )
Contents
Parameters Parameters
- $tokens
-
(Required)
Return Return
(array|mixed)
Source Source
File: src/core/lib/utilities/class-automator-utilities.php
public function remove_duplicate_token_ids( $tokens ) { $new_tokens = array(); if ( empty( $tokens ) ) { return $tokens; } foreach ( $tokens as $token ) { if ( ! array_key_exists( $token['tokenId'], $new_tokens ) ) { $new_tokens[ $token['tokenId'] ] = $token; } } return array_values( $new_tokens ); }
Expand full source code Collapse full source code View on Github