Gets the value of distFiles.

@param Collection|DistFile[] $distFiles

@throws \UnexpectedValueException
516986
public function setDistFiles(Collection $distFiles)
    {
        if ($distFiles->getType() !== DistFile::class) {
            throw new \UnexpectedValueException('The Collection is not of DistFile type');
        }

        $this->distFiles = $distFiles;
    }
50911
public function offsetGet($offset)
    {
        switch ($offset) {
            case 'operator':
                return $this->getOperator();
                break;

            case 'leftSubTerm':
                return $this->getLeftSubTerm();
                break;

            case 'rightSubTerm':
                return $this->getRightSubTerm();
                break;

            default:
                throw new \UnexpectedValueException("Offset $offset does not exist.");
        }
    }
1148391
public function get($key)
    {
        $ret = $this->traverseTree($key);
        if(!is_scalar($ret))
        {
            throw new UnexpectedValueException("The {$key} configuration value is not scalar");
        }
        return $ret;
    }
422491
public function set($fields = null)
    {
        if ($fields === null) {
            return $this->clause('set');
        }

        if (!in_array($this->action(), [self::ACTION_CREATE, self::ACTION_UPDATE])) {
            throw new \UnexpectedValueException(__('The action of this query needs to be either create update'));
        }

        $this->_parts['set'] = $fields;

        return $this;
    }
1362292
public function findFiles(FileNodeCollectionInterface $files)
    {
        return $files->filter(function (FileNode $file) {
            $metadata = $file->getMetadata();
            if ($metadata) {
                return ($this->filter->matches($file->getMetadata()));
            } else {
                return false;
            }
        });
    }
723918
function getSubmitValues($mergeFiles = false)
    {
        return $mergeFiles? HTML_QuickForm::arrayMerge($this->_submitValues, $this->_submitFiles): $this->_submitValues;
    }
887250
private function loadIniFile($path)
    {
        $data = parse_ini_file($path, true);
        if ($data === false) {
            throw new UnexpectedValueException(
                sprintf('INI file "%s" is empty or invalid', $path)
            );
        }

        return $data;
    }
197371
static public function valueDeleteExtender(RecordValue $valueContainer, $deleteFiles) {
        if ($deleteFiles) {
            /** @var FileColumn $column */
            $column = $valueContainer->getColumn();
            $fileConfig = $column->getConfiguration();
            $pkValue = $valueContainer->getRecord()->getPrimaryKeyValue();
            \File::cleanDirectory($fileConfig->getAbsolutePathToFileFolder($valueContainer->getRecord()));
            if ($pkValue) {
                \File::cleanDirectory($fileConfig->getAbsolutePathToFileFolder($valueContainer->getRecord()));
            }
        }
    }
732288
public function get($key)
    {
        if (!$this->offsetExists($key)) {
            throw new UnexpectedValueException(sprintf('Unknown key %s.', $key));
        }

        return $this->offsetGet($key);
    }
992656
public function has($file)
    {
        if (($isArray = is_array($file)) || $file instanceof Traversable) {
            foreach ($file as $key => $f) {
                try {
                    if ( ! $this->has($f)) {
                        return false;
                    }
                }
                catch (InvalidArgumentException $e) {
                    throw new UnexpectedValueException(
                        sprintf(
                            "%s's value at key %s caused InvalidArgumentException",
                            $isArray ? 'Array' : 'FileBag',
                            $key
                        ),
                        null,
                        $e
                    );
                }
                catch (UnexpectedValueException $e) {
                    throw new UnexpectedValueException(
                        sprintf(
                            "%s's value at key %s caused UnexpectedValueException",
                            $isArray ? 'Array' : 'FileBag',
                            $key
                        ),
                        null,
                        $e
                    );
                }
            }
        }
        elseif ($file instanceof SplFileInfo
            || $file instanceof File
        ) {
            return $this->files->contains($file);
        }
        else {
            throw InvalidArgumentException::create(
                sprintf(
                    '%1$s/File|%1$s/File[]|%1$s/FileBag',
                    __NAMESPACE__
                ),
                $file
            );
        }

        return true;
    }
895813
public function afterGetFiles(RequireJsCollector $subject, array $files)
    {
        $magentoVersion = $this->productMetadata->getVersion();

        if (version_compare($magentoVersion, '2.2.0', '>=')) {

            foreach ($files as $index => $file) {

                if ($file->getModule() === 'Bolt_Boltpay') {
                    unset($files[$index]);
                }
            }
        }
        return $files;
    }
84742
protected function traverseRecursively(string $path, int $depth = 0)
    {
        if ($depth > $this->maxDepth) {
            return;
        }

        /**
         * @throws \UnexpectedValueException
         */
        $iterator = new \FilesystemIterator(
            $path,
            \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS
            | ($this->skipSymLinks ? 0 : \FilesystemIterator::FOLLOW_SYMLINKS)
        );

        foreach ($iterator as $item) {
            $filename = $item->getFilename();

            $is_dir = $item->isDir();

            if ($is_dir == $this->dirs && $this->filter($item)) {
                if (!$this->requireUnique) {
                    if (!$this->itemValue) {
                        $this->append($item->getPathname());
                    }
                    else {
                        // Pathnames are key if itemValue and not requireUnique.
                        $this->offsetSet(
                            $item->getPathname(),
                            call_user_func_array($this->itemValue, [$item])
                        );
                    }
                }
                // Filenames are keys if requireUnique.
                elseif ($this->offsetExists($filename)) {
                    throw new FileNonUniqueException(
                        'Non-unique ' . (!$this->dirs ? 'filename' : 'dirname') . '[' . $filename
                        . '] found in paths [' . $this->offsetGet($filename) . ']'
                        . ' and [' . $item->getPathname() . '].'
                    );
                }
                else {
                    $this->offsetSet(
                        // Filenames are keys if requireUnique.
                        $filename,
                        !$this->itemValue ? $item->getPathname() : call_user_func_array($this->itemValue, [$item])
                    );
                }

                // If directory and not set to traverse matching dir.
                if ($is_dir && $this->dirs == 1) {
                    continue;
                }
            }
            elseif ($is_dir && !$this->traverseHidden && $filename{0} == '.') {
                continue;
            }

            if ($is_dir) {
                $pathname = $item->getPathname();
                if (!$this->skipUnreadable || is_readable($pathname)) {
                    $this->traverseRecursively($pathname, $depth + 1);
                }
            }
        }
    }
827320
protected function byProperty()
    {
        $fields = $this->fieldIdentifiers();
        if (empty($fields)) {
            throw new UnexpectedValueException(
                'Property is required.'
            );
        }

        $dir = $this->direction();
        $dir = $dir === null ? '' : ' '.$dir;

        return implode($dir.', ', $fields).$dir;
    }
76015
public function pop($path)
    {
        $node = $this->get($path);

        if (\is_object($node)) {
            $node = get_object_vars($node);
        }

        if (!\is_array($node)) {
            throw new \UnexpectedValueException(
                sprintf(
                    'The value at path: %s should be object or array but is %s.',
                    $path,
                    \gettype($node)
                )
            );
        }

        $value = array_pop($node);

        $this->set($path, $node);

        return $value;
    }
1282816
protected function databaseValue($values)
    {
        if (!is_array($values)) {
            throw ODMException::invalidValueForType('List', ['array', 'null'], $values);
        }

        //re-index numerically
        $values = array_values($values); //TODO: Remove me? handle in CollectionPersister?

        return $values;
    }
613886
public function push($path, $value)
    {
        $node = $this->get($path);

        if (!$node) {
            $node = [];
        } elseif (\is_object($node)) {
            $node = get_object_vars($node);
        }

        if (!\is_array($node)) {
            throw new \UnexpectedValueException(
                sprintf(
                    'The value at path: %s should be object or array but is %s.',
                    $path,
                    \gettype($node)
                )
            );
        }

        $args = \func_get_args();

        if (count($args) <= 2) {
            $num = array_push($node, $value);
        } else {
            $args[0] = &$node;

            $num = call_user_func_array('array_push', $args);
        }

        $this->set($path, $node);

        return $num;
    }
147010
public function handle(Filesystem $filesystem, AddonEnvironment $env)
    {
        // make addons/
        $addons_directory = $env->path();
        if (!$filesystem->exists($addons_directory)) {
            $filesystem->makeDirectory($addons_directory);
        }

        $addon_name = $this->argument('addon');
        if (! $addon_name) {
            $addons = $env->addons();

            $this->line('--------');
            foreach ($addons as $addon) {
                $this->dump($addon);
                $this->line('--------');
            }
        }
        else {
            $addon = $env->addon($addon_name);

            // check addon
            if ($addon === null) {
                throw new UnexpectedValueException(sprintf('Addon "%s" is not found.', $addon_name));
            }

            $this->dump($addon);
        }
    }