PublicKeyException::getGenerator()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Mdanter\Ecc\Exception;
5
6
use Mdanter\Ecc\Primitives\GeneratorPoint;
7
use Mdanter\Ecc\Primitives\PointInterface;
8
use Throwable;
9
10
class PublicKeyException extends \RuntimeException
11
{
12
    /**
13
     * @var GeneratorPoint
14
     */
15
    private $G;
16
17
    /**
18
     * @var PointInterface
19
     */
20
    private $point;
21
22
    public function __construct(GeneratorPoint $G, PointInterface $point, string $message = "", int $code = 0, Throwable $previous = null)
23
    {
24
        $this->G = $G;
25
        $this->point = $point;
26
        parent::__construct($message, $code, $previous);
27
    }
28
29
    public function getGenerator(): GeneratorPoint
30
    {
31
        return $this->G;
32
    }
33
34
    public function getPoint(): PointInterface
35
    {
36
        return $this->point;
37
    }
38
}
39