Passed
Push — master ( 685e2a...9f4f72 )
by Iman
03:13
created

BaseReaction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 12
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __destruct() 0 3 1
A commit() 0 5 1
1
<?php
2
3
namespace Imanghafoori\HeyMan\Core;
4
5
class BaseReaction
6
{
7 98
    public function __destruct()
8
    {
9 98
        resolve('heyman.chains')->commitChain();
0 ignored issues
show
Bug introduced by
The method commitChain() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

9
        resolve('heyman.chains')->/** @scrutinizer ignore-call */ commitChain();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
10 98
    }
11
12 88
    protected function commit($args, $methodName)
13
    {
14 88
        $chain = resolve('heyman.chain');
15 88
        $chain->push('data', $args);
0 ignored issues
show
Bug introduced by
The method push() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

15
        $chain->/** @scrutinizer ignore-call */ 
16
                push('data', $args);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16 88
        $chain->set('responseType', $methodName);
0 ignored issues
show
Bug introduced by
The method set() does not exist on Illuminate\Foundation\Application. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

16
        $chain->/** @scrutinizer ignore-call */ 
17
                set('responseType', $methodName);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
17
    }
18
}