GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

FirephpHelper   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 4 1
1
<?php
2
/*
3
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
4
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
5
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
6
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
7
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
8
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
9
 */
10
11
namespace MpaFirephpWrapper\View\Helper;
12
13
use MpaFirephpWrapper\Service\FirephpWrapper;
14
use Zend\View\Helper\AbstractHelper;
15
16
class FirephpHelper extends AbstractHelper
17
{
18
    protected $firephp;
19
20
    /**
21
     * @param FirephpWrapper $firephp
22
     */
23 4
    public function __construct(FirephpWrapper $firephp)
24
    {
25 4
        $this->firephp = $firephp;
26 4
    }
27
28
    /**
29
     * @param        $object
30
     * @param  string $type
31
     * @param  string $label
32
     * @param  array  $options
33
     * @return FirephpWrapper
34
     */
35 3
    public function __invoke($object, $type = 'info', $label = null, $options = [])
36
    {
37 3
        return $this->firephp->write($object, $type, $label, $options);
0 ignored issues
show
Bug introduced by
It seems like $label defined by parameter $label on line 35 can also be of type string; however, MpaFirephpWrapper\Service\FirephpWrapper::write() does only seem to accept null, maybe add an additional type check?

This check looks at variables that have been passed in as parameters and are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
38
    }
39
}
40