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 sebastian/complexity.
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 SebastianBergmann\Complexity;
11
 
12
/**
13
 * @psalm-immutable
14
 */
15
final class Complexity
16
{
17
    /**
18
     * @var string
19
     */
20
    private $name;
21
 
22
    /**
23
     * @var int
24
     */
25
    private $cyclomaticComplexity;
26
 
27
    public function __construct(string $name, int $cyclomaticComplexity)
28
    {
29
        $this->name                 = $name;
30
        $this->cyclomaticComplexity = $cyclomaticComplexity;
31
    }
32
 
33
    public function name(): string
34
    {
35
        return $this->name;
36
    }
37
 
38
    public function cyclomaticComplexity(): int
39
    {
40
        return $this->cyclomaticComplexity;
41
    }
42
}