src/Filter/ChainFilter.php
public function process(ThingInterface $thing, $sourcePath, OptionsInterface $options = null)
    {
        $result = null;
        foreach ($this->filters as $filter) {
            if ($result === null) {
                $result = $filter->process($thing, $sourcePath, $options);
            } else {
                $tmp = [];

                foreach ($result as $path) {
                    $tmp = array_merge($tmp, $filter->process($thing, $path, $options));
                }

                $result = $tmp;
            }
        }

        return $result;
    }
public function process(ThingInterface $thing, $sourcePath, OptionsInterface $options = null)
    {
        $result = null;
        foreach ($this->filters as $filter) {
            if ($result === null) {
                $result = $filter->process($thing, $sourcePath, $options);
            } else {
                $tmp = [];

                foreach ($result as $path) {
                    $tmp = array_merge($tmp, $filter->process($thing, $path, $options));
                }

                $result = $tmp;
            }
        }

        return $result;
    }
@param ThingInterface   $thing
@param string           $sourcePath
@param OptionsInterface $options

@return array Paths to generated files