@param string $from
@param string $to

@return mixed
345014
protected function onReleaseReady($from, $to)
    {
        $this->explainer->comment(sprintf('Uploading files from %s to %s', $from, $to));

        // Only gather files from existing folders (for pretend mode)
        $folders = array_filter([$from], 'is_dir');
        if (!$folders) {
            return true;
        }

        $files = (new Finder())->in($folders)->exclude(['.git']);
        $format = $this->explainer->getProgressBarFormat(
            '%current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%'.PHP_EOL.
            '%message%'
        );

        // Create progress bar
        $progress = $this->command->createProgressBar(iterator_count($files));
        $progress->setFormat($format);
        $progress->start();

        foreach ($files as $file) {
            $origin = str_replace($from, null, $file->getPathname());
            $path = $to.DS.str_replace($from, null, $file->getPathname());
            $progress->setMessage(
                dirname($origin).DS.
                '<info>'.basename($origin).'</info>'
            );

            if ($file->isDir()) {
                $this->createFolder($path);
            } else {
                $this->put($path, $file->getContents());
            }

            $progress->advance();
        }

        $progress->finish();

        return true;
    }
681335
protected function publishItem($from, $to)
    {
        if ($this->files->isFile($from)) {
            return $this->publishFile($from, $to);
        } elseif ($this->files->isDirectory($from)) {
            return $this->publishDirectory($from, $to);
        }

        $this->error("Can't locate path: <{$from}>");
    }
1287519
public static function convert($input, $from, $to)
    {
        if (!method_exists(self::class, $to)) {
            return $input;
        }
        
        if (in_array($from, ['camel', 'pascal'])) {
            $converted = self::$from($input);
            $converted = preg_replace('/([a-z])([A-Z])/', '$1 $2', $converted);
            $converted = preg_replace('/(\D)?(\d+)(\D)?/', '$1 $2 $3', $converted);
            return self::$to($converted);
        }
        
        if (method_exists(self::class, $from)) {
            return self::$to(self::$from($input));
        }
        
        return self::$to($input);
    }
658885
public function copy( $from, $to )
	{
		try {
			$this->fs->copy( $from, $to );
		} catch( \Exception $e ) {
			throw new Exception( $e->getMessage(), 0, $e );
		}
	}
956021
protected function _findRelativePath($from, $to)
    {
        $path = dirname($from);
        $to = str_replace(COMPOSER_ROOT.DIRECTORY_SEPARATOR, '', $to);

        while ($path != COMPOSER_ROOT) {
            $path = dirname($path);
            $to = '..'.DIRECTORY_SEPARATOR.$to;
        };

        return $to;
    }
969399
protected function moveUploadedFile($from, $to)
    {
        return $this->unitTest ? copy($from, $to) : @move_uploaded_file($from, $to);
    }
1364166
public function translate($word, $to, $from = null)
    {
        if (is_null($this->translator)) {
            /** @var string $translator */
            $translator       = config(self::PREFIX_LARAVEL_CONFIG.'translator');
            $this->translator = new Translator('Microsoft', [
                'client_key'       => config(self::PREFIX_LARAVEL_CONFIG.'translators.'.$translator.'.client_key'),
                'default_language' => config(self::PREFIX_LARAVEL_CONFIG.'translators.'.$translator.'.default_language'),
            ]);
        }

        $translation = $this->translator->translate($word, $to, $from);

        if (is_null($translation)) {
            $translation = $word;
        }

        return $translation;
    }
1157843
public function unpack($from, $to)
    {
        if (($gzip = gzopen($from, 'rb')) === false) {
            throw new Exception('Unable to read compressed file.');
        }

        if (($target = fopen($to, 'w')) === false) {
            throw new Exception('Unable to open the target.');
        }

        while ($string = gzread($gzip, 4096)) {
            fwrite($target, $string, strlen($string));
        }

        gzclose($gzip);
        fclose($target);
    }
268340
public function alias($from, $to = null)
	{
		if (is_array($from))
		{
			$this->aliases = array_merge($this->aliases, $from);

			return $this;
		}

		$this->aliases[$from] = $to;
		$this->cache->set($from, $to);
	}
992026
public function move($from, $to)
    {
        return $this->filesystem->move(
            $this->path($from),
            $this->path($to)
        );
    }
1130507
public function getCommitsBetween(string $from, string $to) : array
    {
        $cmd = (new Commits($this->repo->getRoot()))->byRevision($from, $to)
                                                    ->prettyFormat(Commits\Jsonized::FORMAT);

        $result = $this->runner->run($cmd, new Commits\Jsonized());
        return $result->getFormattedOutput();
    }
780934
public static function createFrom(self $from, $to = null)
    {
        $request = $to ?: new static;

        $files = $from->files->all();

        $files = is_array($files) ? array_filter($files) : $files;

        $request->initialize(
            $from->query->all(),
            $from->request->all(),
            $from->attributes->all(),
            $from->cookies->all(),
            $files,
            $from->server->all(),
            $from->getContent()
        );

        $request->headers->replace($from->headers->all());

        $request->setJson($from->json());

        if ($session = $from->getSession()) {
            $request->setLaravelSession($session);
        }

        $request->setUserResolver($from->getUserResolver());

        $request->setRouteResolver($from->getRouteResolver());

        return $request;
    }
230490
public function compare(string $from, string $to): array
    {
        $compare = (new Compare($this->repo->getRoot()))->revisions($from, $to)
                                                        ->ignoreWhitespacesAtEndOfLine();

        $result = $this->runner->run($compare, new Compare\FullDiffList());

        return $result->getFormattedOutput();
    }
293442
protected function onReleaseReady($from, $to)
    {
        // Build host handle
        $arguments = [];
        $handle = $this->getSyncHandle();

        // Create options
        $options = [
            '--verbose' => null,
            '--recursive' => null,
            '--compress' => null,
            '--rsh' => $this->getTransport(),
            '--exclude' => $this->getOption('excluded', true),
        ];

        // Build arguments
        $arguments[] = $from;
        $arguments[] = $handle.':'.$to;

        // Create binary and command
        $rsync = $this->binary('rsync');
        $command = $rsync->getCommand(null, $arguments, $options);

        return $this->bash->runLocally($command);
    }
739221
public function rename($from, $to)
    {
        // TODO: add directories support

        $contents = self::cache()->get($from);
        if (false === $contents) {
            return false;
        }

        self::cache()->delete($from);
        self::cache()->set($to, $contents);

        return true;
    }
950626
public function getDataBetween($from = null, $to = null)
    {
        $answerPosts = $this->getAnswerPosts($from, $to);

        $yesno = array('yes' => 0, 'no' => 0);
        $pending = array();

        foreach ($answerPosts as $post) {
            $topics = wp_get_post_terms($post->ID, 'feedback_topic');
            $feedback_topics = array();
            if (!empty($topics)) {
                foreach ($topics as $topic) {
                    $feedback_topics[] = $topic->name;
                }
            }

            $post->answer = array(
                'post_id' => get_post_meta($post->ID, 'customer_feedback_page_reference', true),
                'answer' => get_post_meta($post->ID, 'customer_feedback_answer', true),
                'comment' => get_post_meta($post->ID, 'customer_feedback_comment', true),
                'topics' => $feedback_topics
            );

            // Count yes/no
            switch ($post->answer['answer']) {
                case 'yes':
                    $yesno['yes']++;
                    break;

                case 'no':
                    $yesno['no']++;
                    break;
            }

            if ($post->post_status === 'pending') {
                $pending[] = $post;
            }
        }

        // Get the percentage ratio for $yesno
        $totalAnswers = array_sum($yesno);
        $yesnoPercent = array_map(function ($item) use ($totalAnswers) {
            if ($totalAnswers === 0) {
                return 0;
            }

            return ($item / $totalAnswers) * 100;
        }, $yesno);

        // Return array
        $data = array(
            'count' => $yesno,
            'percent' => $yesnoPercent,
            'pending' => $pending
        );

        return $data;
    }
815510
private function _replace($from, $to) : array
    {
        $values = $this->getValues();
        foreach($values as $key => $value)
        {
            if ($value === $from)
            {
                $values[$key] = $to;
            }
        }
        return $values;
    }