![]() 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/allure-framework/allure-php-commons/src/Internal/ |
<?php declare(strict_types=1); namespace Qameta\Allure\Internal; use Qameta\Allure\AllureLifecycleInterface; use Qameta\Allure\Model\Parameter; use Qameta\Allure\Model\ParameterMode; use Qameta\Allure\Model\StepResult; use Qameta\Allure\StepContextInterface; /** * @internal */ final class StepContext implements StepContextInterface { public function __construct( private AllureLifecycleInterface $lifecycle, private string $uuid, ) { } public function name(string $name): void { $this->lifecycle->updateStep( fn (StepResult $step) => $step->setName($name), $this->uuid, ); } public function parameter( string $name, ?string $value, bool $excluded = false, ?ParameterMode $mode = null, ): ?string { $param = new Parameter( name: $name, value: $value, excluded: $excluded, mode: $mode, ); $this->lifecycle->updateStep( fn (StepResult $step) => $step->addParameters($param), $this->uuid, ); return $value; } }