BaseTest::getApiEndpoint()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
rs 10
1
<?php
2
/**
3
 * File: BaseTest.php
4
 *
5
 * @author      Maciej Sławik <[email protected]>
6
 * Github:      https://github.com/maciejslawik
7
 */
8
9
namespace MSlwk\FreshMail\Tests;
10
11
/**
12
 * Class BaseTest
13
 *
14
 * @package MSlwk\FreshMail\Tests
15
 */
16
trait BaseTest
17
{
18
    /**
19
     * @param $handlerObject
20
     * @return string
21
     */
22
    public function getApiEndpoint($handlerObject): string
23
    {
24
        $class = new \ReflectionClass($handlerObject);
25
        $method = $class->getMethod('getApiEndpoint');
26
        $method->setAccessible(true);
27
        return $method->invoke($handlerObject);
28
    }
29
}
30