HeadRequest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A prepare() 0 7 1
1
<?php declare(strict_types=1);
2
3
/**
4
 * @author  Vadim Bova <[email protected]>
5
 * @link    https://bova.io
6
 */
7
8
namespace Folour\Oxide\Components\Request;
9
10
use Folour\Oxide\Interfaces\RequestInterface;
11
12
/**
13
 * HEAD request
14
 *
15
 * @package Folour\Oxide
16
 */
17
class HeadRequest extends GetRequest implements RequestInterface
18
{
19
    /**
20
     * @inheritdoc
21
     */
22
    protected function prepare(string $url, string $raw_data = null): array
23
    {
24
        return array_replace(parent::prepare($url, $raw_data), [
25
            CURLOPT_CUSTOMREQUEST   => 'HEAD',
26
            CURLOPT_NOBODY          => true
27
        ]);
28
    }
29
}