Completed
Push — master ( c556fe...70cab5 )
by Julien
03:22
created

URLRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFormValues() 0 5 1
A __construct() 0 3 1
A getPostURL() 0 3 1
1
<?php
2
3
namespace TheCodingMachine\Gotenberg;
4
5
class URLRequest extends ChromeRequest
6
{
7
    /** @var string */
8
    protected $URL;
9
10
    /**
11
     * HTMLRequest constructor.
12
     * @param string $URL
13
     */
14
    public function __construct(string $URL)
15
    {
16
        $this->URL = $URL;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getPostURL(): string
23
    {
24
        return '/convert/url';
25
    }
26
27
    /**
28
     * @return array<string,mixed>
29
     */
30
    public function getFormValues(): array
31
    {
32
        $values = parent::getFormValues();
33
        $values[self::REMOTE_URL] = $this->URL;
34
        return $values;
35
    }
36
}
37