Postable   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 1
eloc 3
c 3
b 1
f 0
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A postRequest() 0 5 1
1
<?php
2
3
namespace Lyal\Checkr\Traits;
4
5
trait Postable
6
{
7
    /**
8
     * Abstract functions to imppose requirements for the exhibiting class.
9
     */
10
    abstract public function getResourceName($object = null);
11
12
    abstract public function getAttributes($sanitized = true);
13
14
    abstract public function processPath($path = null, array $values = null);
15
16
    abstract public function getClient();
17
18
    abstract public function setValues($values);
19
20
    public function postRequest($path, array $options = [])
21
    {
22
        $options['form_params'] = $this->getAttributes();
23
24
        return $this->getClient()->request('post', $path, $options);
25
    }
26
}
27