Completed
Push — master ( e97c13...1021f1 )
by Timur
02:50
created

GetDeploymentLogCommand::siteResourcePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Laravel\Forge\Sites\Commands\Deployment;
4
5
use Laravel\Forge\Server;
6
use Psr\Http\Message\ResponseInterface;
7
use Laravel\Forge\Sites\Commands\SiteResourceCommand;
8
9
class GetDeploymentLogCommand extends SiteResourceCommand
10
{
11
    /**
12
     * Site resource path.
13
     *
14
     * @return string
15
     */
16
    public function siteResourcePath()
17
    {
18
        return 'deployment/log';
19
    }
20
21
    /**
22
     * HTTP request method.
23
     *
24
     * @return string
25
     */
26
    public function requestMethod()
27
    {
28
        return 'GET';
29
    }
30
31
    /**
32
     * Handle command response.
33
     *
34
     * @param \Psr\Http\Message\ResponseInterface $response
35
     * @param \Laravel\Forge\Server               $server
36
     *
37
     * @return string
38
     */
39
    public function handleResponse(ResponseInterface $response, Server $server)
40
    {
41
        return (string) $response->getBody();
42
    }
43
}
44