Test Failed
Push — master ( 9a7899...702660 )
by Mike
44s queued 11s
created

Modify   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 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 Modify implements RequestInterface
8
{
9
10
    /** @var int */
11
    private $classroomId;
12
13
    /** @var Classroom */
14
    private $classroom;
15
16
    public function __construct($classroomId, Classroom $classroom)
17
    {
18
        $this->classroomId = (int)$classroomId;
19
        $this->classroom   = $classroom;
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function getMethod()
26
    {
27
        return 'modify';
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getParams()
34
    {
35
        return array_merge(['class_id' => $this->classroomId], $this->classroom->toArray());
36
    }
37
}
38