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

Modify::getParams()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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