Completed
Branch master (ae6db9)
by Matt
01:40
created

PowerOff   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 25
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getBody() 0 4 1
1
<?php
2
namespace Billow\Actions;
3
4
/**
5
 * @author Matt Frost<[email protected]>
6
 * @package Billow
7
 * @subpackage Actions
8
 * @license http://opensource.org/licenses/MIT MIT
9
 */
10
class PowerOff extends Action
11
{
12
    /**
13
     * Action parameter
14
     *
15
     * @const ACTION
16
     */
17
    const ACTION = 'power_off';
18
19
    /**
20
     * Action HTTP Method
21
     *
22
     * @const method
23
     */
24
    const METHOD = 'POST';
25
26
    /**
27
     * Return the body of the request
28
     *
29
     * @return string json representation of the body
30
     */
31 1
    public function getBody()
32
    {
33 1
        return json_encode([
34 1
            'type' => self::ACTION
35
        ]);
36
    }
37
}
38