<commit_before><?php

namespace Orchestra\Foundation\Http\Controllers;

use Illuminate\Support\Facades\Input;
use Orchestra\Foundation\Processor\AssetPublisher;
use Orchestra\Contracts\Foundation\Listener\AssetPublishing as Listener;

class PublisherController extends AdminController implements Listener
{
    /**
     * Setup controller middleware.
     *
     * @return void
     */
    protected function onCreate()
    {
        $this->middleware([
            'orchestra.auth',
            'orchestra.can:manage-orchestra',
        ]);
    }

    /**
     * Load publisher based on service.
     *
     * @param  \Orchestra\Foundation\Processor\AssetPublisher  $processor
     *
     * @return mixed
     */
    public function show(AssetPublisher $processor)
    {
        return $processor->executeAndRedirect($this);
    }

    /**
     * Show FTP configuration form or run the queue.
     *
     * @return mixed
     */
    public function ftp()
    {
        set_meta('title', trans('orchestra/foundation::title.publisher.ftp'));
        set_meta('description', trans('orchestra/foundation::title.publisher.description'));

        return view('orchestra/foundation::publisher.ftp');
    }

    /**
     * POST FTP configuration and run the queue.
     *
     * POST (orchestra)/publisher/ftp
     *
     * @param  \Orchestra\Foundation\Processor\AssetPublisher  $processor
     *
     * @return mixed
     */
    public function publish(AssetPublisher $processor)
    {
        $input = Input::only(['host', 'user', 'password']);
        $input['ssl'] = (Input::get('connection-type', 'sftp') === 'sftp');

        return $processor->publish($this, $input);
    }

    /**
     * Response to publishing asset failed.
     *
     * @param  array  $errors
     *
     * @return mixed
     */
    public function publishingHasFailed(array $errors)
    {
        return $this->redirectWithMessage(handles('orchestra::extension'), $errors['error'], 'error')->withInput();
    }

    /**
     * Response to publishing asset succeed.
     *
     * @return mixed
     */
    public function publishingHasSucceed()
    {
        return $this->redirect(handles('orchestra::extensions'));
    }
}<commit_msg>Update url.<commit_after><?php

namespace Orchestra\Foundation\Http\Controllers;

use Illuminate\Support\Facades\Input;
use Orchestra\Foundation\Processor\AssetPublisher;
use Orchestra\Contracts\Foundation\Listener\AssetPublishing as Listener;

class PublisherController extends AdminController implements Listener
{
    /**
     * Setup controller middleware.
     *
     * @return void
     */
    protected function onCreate()
    {
        $this->middleware([
            'orchestra.auth',
            'orchestra.can:manage-orchestra',
        ]);
    }

    /**
     * Load publisher based on service.
     *
     * @param  \Orchestra\Foundation\Processor\AssetPublisher  $processor
     *
     * @return mixed
     */
    public function show(AssetPublisher $processor)
    {
        return $processor->executeAndRedirect($this);
    }

    /**
     * Show FTP configuration form or run the queue.
     *
     * @return mixed
     */
    public function ftp()
    {
        set_meta('title', trans('orchestra/foundation::title.publisher.ftp'));
        set_meta('description', trans('orchestra/foundation::title.publisher.description'));

        return view('orchestra/foundation::publisher.ftp');
    }

    /**
     * POST FTP configuration and run the queue.
     *
     * POST (orchestra)/publisher/ftp
     *
     * @param  \Orchestra\Foundation\Processor\AssetPublisher  $processor
     *
     * @return mixed
     */
    public function publish(AssetPublisher $processor)
    {
        $input = Input::only(['host', 'user', 'password']);
        $input['ssl'] = (Input::get('connection-type', 'sftp') === 'sftp');

        return $processor->publish($this, $input);
    }

    /**
     * Response to publishing asset failed.
     *
     * @param  array  $errors
     *
     * @return mixed
     */
    public function publishingHasFailed(array $errors)
    {
        return $this->redirectWithMessage(handles('orchestra::extensions'), $errors['error'], 'error')->withInput();
    }

    /**
     * Response to publishing asset succeed.
     *
     * @return mixed
     */
    public function publishingHasSucceed()
    {
        return $this->redirect(handles('orchestra::extensions'));
    }
}
{'fraction_non_alphanumeric': 0.13063165044147612, 'fraction_numerical': 0.0, 'mean_word_length': 2.5543041029766695, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2484486', 'n_tokens_mistral': 1256, 'n_tokens_neox': 1230, 'n_words': 245}