Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php declare(strict_types=1);
2
/*
3
 * This file is part of PHPUnit.
4
 *
5
 * (c) Sebastian Bergmann <sebastian@phpunit.de>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PHPUnit\TextUI\XmlConfiguration;
11
 
12
/**
13
 * @internal This class is not covered by the backward compatibility promise for PHPUnit
14
 *
15
 * @psalm-immutable
16
 */
17
final class Extension
18
{
19
    /**
20
     * @var string
21
     *
22
     * @psalm-var class-string
23
     */
24
    private $className;
25
 
26
    /**
27
     * @var string
28
     */
29
    private $sourceFile;
30
 
31
    /**
32
     * @var array
33
     */
34
    private $arguments;
35
 
36
    /**
37
     * @psalm-param class-string $className
38
     */
39
    public function __construct(string $className, string $sourceFile, array $arguments)
40
    {
41
        $this->className  = $className;
42
        $this->sourceFile = $sourceFile;
43
        $this->arguments  = $arguments;
44
    }
45
 
46
    /**
47
     * @psalm-return class-string
48
     */
49
    public function className(): string
50
    {
51
        return $this->className;
52
    }
53
 
54
    public function hasSourceFile(): bool
55
    {
56
        return $this->sourceFile !== '';
57
    }
58
 
59
    public function sourceFile(): string
60
    {
61
        return $this->sourceFile;
62
    }
63
 
64
    public function hasArguments(): bool
65
    {
66
        return !empty($this->arguments);
67
    }
68
 
69
    public function arguments(): array
70
    {
71
        return $this->arguments;
72
    }
73
}