public static function get_files_to_publish($type = null)
    {
        if (!isset(static::$publishes[ static::class ])) {
            return [];
        }

        if ($type !== null) {
            return static::$publishes[ static::class ][ $type ];
        }

        $iterator = new RecursiveIteratorIterator(
            new RecursiveArrayIterator(static::$publishes[ static::class ])
        );

        return \iterator_to_array($iterator);
    }