InputData::getMethods()   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
eloc 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * InputData.php
5
 *
6
 * Input data to query the metadata reader.
7
 *
8
 * @package jaxon-core
9
 * @author Thierry Feuzeu <[email protected]>
10
 * @copyright 2024 Thierry Feuzeu <[email protected]>
11
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
12
 * @link https://github.com/jaxon-php/jaxon-core
13
 */
14
15
namespace Jaxon\App\Metadata;
16
17
use ReflectionClass;
18
19
use function is_string;
20
21
class InputData implements InputDataInterface
22
{
23
    /**
24
     * @var ReflectionClass
25
     */
26
    private $xReflectionClass;
27
28
    /**
29
     * @param ReflectionClass|string $xClass
30
     * @param array $aMethods
31
     * @param array $aProperties
32
     */
33
    public function __construct(ReflectionClass|string $xClass,
34
        private array $aMethods = [], private array $aProperties = [])
35
    {
36
        $this->xReflectionClass = is_string($xClass) ? new ReflectionClass($xClass) : $xClass;
37
    }
38
39
    /**
40
     * @inheritDoc
41
     */
42
    public function getReflectionClass(): ReflectionClass
43
    {
44
        return $this->xReflectionClass;
45
    }
46
47
    /**
48
     * @inheritDoc
49
     */
50
    public function getMethods(): array
51
    {
52
        return $this->aMethods;
53
    }
54
55
    /**
56
     * @inheritDoc
57
     */
58
    public function getProperties(): array
59
    {
60
        return $this->aProperties;
61
    }
62
}
63