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/allure-framework/allure-php-commons/src/Model/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/allure-framework/allure-php-commons/src/Model/ModelProviderChain.php
<?php

declare(strict_types=1);

namespace Qameta\Allure\Model;

use function array_map;
use function array_merge;
use function array_reverse;
use function array_values;

final class ModelProviderChain implements ModelProviderInterface
{
    /**
     * @var list<ModelProviderInterface>
     */
    private array $providers;

    public function __construct(ModelProviderInterface ...$providers)
    {
        $this->providers = array_values($providers);
    }

    /**
     * @return list<Link>
     */
    public function getLinks(): array
    {
        return array_merge(
            ...array_map(
                /** @psalm-return list<Link> */
                fn (ModelProviderInterface $p): array => $p->getLinks(),
                $this->providers,
            ),
        );
    }

    /**
     * @return list<Label>
     */
    public function getLabels(): array
    {
        return array_merge(
            ...array_reverse(
                array_map(
                    /** @psalm-return list<Label> */
                    fn (ModelProviderInterface $p): array => $p->getLabels(),
                    $this->providers,
                ),
            ),
        );
    }

    /**
     * @return list<Parameter>
     */
    public function getParameters(): array
    {
        return array_merge(
            ...array_map(
                /** @psalm-return list<Parameter> */
                fn (ModelProviderInterface $p): array => $p->getParameters(),
                $this->providers,
            ),
        );
    }

    public function getDisplayName(): ?string
    {
        $displayName = null;
        foreach ($this->providers as $provider) {
            $displayName ??= $provider->getDisplayName();
        }

        return $displayName;
    }

    public function getDescription(): ?string
    {
        $description = null;
        foreach ($this->providers as $provider) {
            $description ??= $provider->getDescription();
        }

        return $description;
    }

    public function getDescriptionHtml(): ?string
    {
        $descriptionHtml = null;
        foreach ($this->providers as $provider) {
            $descriptionHtml ??= $provider->getDescriptionHtml();
        }

        return $descriptionHtml;
    }

    public function getFullName(): ?string
    {
        $fullName = null;
        foreach ($this->providers as $provider) {
            $fullName ??= $provider->getFullName();
        }

        return $fullName;
    }
}

Spamworldpro Mini