Passed
Push — master ( 152004...68ba95 )
by Nelson
03:47
created

WithSomeMethodsClass::__call()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * PHP: Nelson Martell Library file
5
 *
6
 * Copyright © 2019 Nelson Martell (http://nelson6e65.github.io)
7
 *
8
 * Licensed under The MIT License (MIT)
9
 * For full copyright and license information, please see the LICENSE
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @copyright 2019 Nelson Martell
13
 * @link      http://nelson6e65.github.io/php_nml/
14
 * @since     1.0.0
15
 * @license   http://www.opensource.org/licenses/mit-license.php The MIT License (MIT)
16
 * */
17
18
declare(strict_types=1);
19
20
namespace NelsonMartell\Test\DataProviders\ExampleClass;
21
22
use BadMethodCallException;
23
24
/**
25
 * @internal
26
 *
27
 * @author Nelson Martell <[email protected]>
28
 * @since 1.0.0
29
 *
30
 * @method string magicMethod()
31
 */
32
class WithSomeMethodsClass
33
{
34
    private function privateMethod(): void
35
    {
36
    }
37
38
    protected function protectedMethod(): void
39
    {
40
    }
41
42
    public function publicMethod(): void
43
    {
44
    }
45
46
    /**
47
     *
48
     *
49
     * @param  string $name
50
     * @param  array  $arguments
51
     *
52
     * @return
53
     */
54
    public function __call(string $name, array $arguments = [])
0 ignored issues
show
Coding Style introduced by
The method parameter $arguments is never used
Loading history...
55
    {
56
        if ($name === 'magicMethod') {
57
            return 'string';
58
        }
59
60
        throw new BadMethodCallException($name . ' method do not exists.');
61
    }
62
}
63