src/Leevel/Http/UploadedFile.php
public function move(string $directory, ?string $name = null): File
    {
        if ($this->isValid()) {
            if ($this->test) {
                return parent::move($directory, $name);
            }

            $target = $this->getTargetFile($directory, $name);

            $this->moveToTarget($this->getPathname(), $target, true);

            return new File($target);
        }

        throw new FileException($this->getErrorMessage());
    }
public function move(string $directory, ?string $name = null): File
    {
        if ($this->isValid()) {
            if ($this->test) {
                return parent::move($directory, $name);
            }

            $target = $this->getTargetFile($directory, $name);

            $this->moveToTarget($this->getPathname(), $target, true);

            return new File($target);
        }

        throw new FileException($this->getErrorMessage());
    }
{@inheritdoc}

@codeCoverageIgnore