Test Failed
Push — master ( 7c4720...fd955c )
by Lyal
04:00 queued 14s
created

Postable::postRequest()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
namespace Lyal\Checkr\Traits;
3
4
5
trait Postable
6
{
7
    public function postRequest($path, array $options = [])
8
    {
9
        $options['form_params'] = $this->getAttributes();
0 ignored issues
show
Bug introduced by
It seems like getAttributes() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

9
        /** @scrutinizer ignore-call */ 
10
        $options['form_params'] = $this->getAttributes();
Loading history...
10
        return $this->getClient()->request('post', $path, $options);
0 ignored issues
show
Bug introduced by
It seems like getClient() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

10
        return $this->/** @scrutinizer ignore-call */ getClient()->request('post', $path, $options);
Loading history...
11
12
    }
13
}