Completed
Push — master ( 8d0bd8...93d98b )
by Mike
06:19
created

Create   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getMethod() 0 4 1
A getParams() 0 4 1
1
<?php
2
namespace mikemix\Wiziq\API\Request;
3
4
use mikemix\Wiziq\Common\Api\RequestInterface;
5
use mikemix\Wiziq\Entity\Classroom;
6
7
class Create implements RequestInterface
8
{
9
    /** @var Classroom */
10
    private $classroom;
11
12 3
    public function __construct(Classroom $classroom)
13
    {
14 3
        $this->classroom = $classroom;
15 3
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 1
    public function getMethod()
21
    {
22 1
        return 'create';
23
    }
24
25
    /**
26
     * {@inheritdoc}
27
     */
28 1
    public function getParams()
29
    {
30 1
        return array_filter($this->classroom->toArray());
31
    }
32
}
33