Completed
Push — master ( e8b22d...bec3f6 )
by Marko
11s
created

InvalidShaderMethodException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 19
ccs 6
cts 6
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
/** @formatter:off
3
 * ******************************************************************
4
 * Created by   Marko Kungla on Jun 21, 2016 - 3:40:17 AM
5
 * Contact      [email protected]
6
 * @copyright   2016 Marko Kungla - https://github.com/mkungla
7
 * @license     The MIT License (MIT)
8
 * 
9
 * @category       AframeVR
10
 * @package        aframe-php
11
 * 
12
 * Lang         PHP (php version >= 7)
13
 * Encoding     UTF-8
14
 * File         InvalidComponentMethodException.php
15
 * Code format  PSR-2 and 12
16
 * @link        https://github.com/mkungla/aframe-php
17
 * @issues      https://github.com/mkungla/aframe-php/issues
18
 * ********************************************************************
19
 * Contributors:
20
 * @author Marko Kungla <[email protected]>
21
 * ********************************************************************
22
 * Comments:
23
 * @formatter:on */
24
namespace AframeVR\Core\Exceptions;
25
26
final class InvalidShaderMethodException extends \BadMethodCallException
27
{
28
    /**
29
     * InvalidComponentMethodException
30
     *
31
     * @param string $message
32
     * @param string $component_method
0 ignored issues
show
Bug introduced by
There is no parameter named $component_method. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
33
     */
34 1
    public function __construct(string $message = 'null', string $shader_method = 'unknown')
35
    {
36 1
        $this->message = sprintf(
37 1
            "Called invalid method (%s) for %s!\nFile: %s on line: %s", 
38
            $message, 
39
            $shader_method, 
40 1
            $this->getFile(), 
41 1
            $this->getLine()
42
        );
43 1
    }
44
}
45