private function setContaoFile($file)
    {
        if (is_array($file)) {
            return serialize(array_map([__CLASS__, 'setContaoFile'], $file));
        }

        if ($file instanceof FilesModel) {
            return $file->uuid;
        }
        if (Validator::isStringUuid($file)) {
            return StringUtil::uuidToBin($file);
        }
        return $file;
    }
private function setContaoFile($file)
    {
        if (is_array($file)) {
            return serialize(array_map([__CLASS__, 'setContaoFile'], $file));
        }

        if ($file instanceof FilesModel) {
            return $file->uuid;
        }
        if (Validator::isStringUuid($file)) {
            return StringUtil::uuidToBin($file);
        }
        return $file;
    }
private function setContaoFile ( $ file ) { if ( is_array ( $ file ) ) { return serialize ( array_map ( [ __CLASS__ , 'setContaoFile' ] , $ file ) ) ; } if ( $ file instanceof FilesModel ) { return $ file -> uuid ; } if ( Validator :: isStringUuid ( $ file ) ) { return StringUtil :: uuidToBin ( $ file ) ; } return $ file ; }
we check if its a file model and extract the uuid. If its a string we convert it.
we check if its a file model and extract the uuid . If its a string we convert it .