app/Functions/FunctionsPrint.php
public static function checkFactUnique(array $uniquefacts, Collection $recfacts): array
    {
        foreach ($recfacts as $factarray) {
            $fact = $factarray->getTag();

            $key = array_search($fact, $uniquefacts, true);
            if ($key !== false) {
                unset($uniquefacts[$key]);
            }
        }

        return $uniquefacts;
    }
public static function checkFactUnique(array $uniquefacts, Collection $recfacts): array
    {
        foreach ($recfacts as $factarray) {
            $fact = $factarray->getTag();

            $key = array_search($fact, $uniquefacts, true);
            if ($key !== false) {
                unset($uniquefacts[$key]);
            }
        }

        return $uniquefacts;
    }
public static function checkFactUnique ( array $ uniquefacts , Collection $ recfacts ) : array { foreach ( $ recfacts as $ factarray ) { $ fact = $ factarray -> getTag ( ) ; $ key = array_search ( $ fact , $ uniquefacts , true ) ; if ( $ key !== false ) { unset ( $ uniquefacts [ $ key ] ) ; } } return $ uniquefacts ; }
Check for facts that may exist only once for a certain record type.
If the fact already exists in the second array, delete it from the first one.

@param string[]   $uniquefacts
@param Collection $recfacts

@return string[]
Check for facts that may exist only once for a certain record type . If the fact already exists in the second array delete it from the first one .