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/Hook/Template/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/captainhook/captainhook/src/Hook/Template/Local.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.
 */

declare(strict_types=1);

namespace CaptainHook\App\Hook\Template;

use CaptainHook\App\Config;
use CaptainHook\App\Hook\Template;

abstract class Local implements Template
{
    /**
     * All template related path information
     *
     * @var \CaptainHook\App\Hook\Template\PathInfo
     */
    protected PathInfo $pathInfo;

    /**
     * CaptainHook configuration
     *
     * @var \CaptainHook\App\Config
     */
    protected Config $config;

    /**
     * Is the executable a phar file
     *
     * @var bool
     */
    protected bool $isPhar;

    /**
     * Local constructor
     *
     * @param \CaptainHook\App\Hook\Template\PathInfo $pathInfo
     * @param \CaptainHook\App\Config                 $config
     * @param bool                                    $isPhar
     */
    public function __construct(PathInfo $pathInfo, Config $config, bool $isPhar)
    {
        $this->pathInfo = $pathInfo;
        $this->config   = $config;
        $this->isPhar   = $isPhar;
    }

    /**
     * Return the code for the git hook scripts
     *
     * @param  string $hook Name of the hook to generate the sourcecode for
     * @return string
     */
    public function getCode(string $hook): string
    {
        return implode(PHP_EOL, $this->getHookLines($hook)) . PHP_EOL;
    }

    /**
     * Return the code for the git hook scripts
     *
     * @param  string $hook Name of the hook to generate the sourcecode for
     * @return array<string>
     */
    abstract protected function getHookLines(string $hook): array;
}

Spamworldpro Mini