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

URLRequest::getFormValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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