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

BaseReaction::__destruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
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
}