Issues (365)

Library/libraries/sylouuu/Curl/Method/Delete.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace sylouuu\Curl\Method;
4
5
    /**
6
     * Delete
7
     *
8
     * @author sylouuu
9
     * @link https://github.com/sylouuu/php-curl
10
     * @version 0.8.1
11
     * @license MIT
12
     */
13
    class Delete extends \sylouuu\Curl\Curl
14
    {
15
        /**
16
         * Constructor
17
         *
18
         * @param string $url
19
         * @param array $options
20
         */
21
        public function __construct($url, $options = null)
22
        {
23
            parent::__construct($url, $options);
24
25
            $this->prepare();
26
        }
27
28
        /**
29
         * Prepare the request
30
         */
31
        public function prepare()
32
        {
33
            $this->setCurlOption(CURLOPT_CUSTOMREQUEST, 'DELETE');
0 ignored issues
show
sylouuu\Curl\Method\CURLOPT_CUSTOMREQUEST of type integer is incompatible with the type sylouuu\Curl\const expected by parameter $option of sylouuu\Curl\Curl::setCurlOption(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

33
            $this->setCurlOption(/** @scrutinizer ignore-type */ CURLOPT_CUSTOMREQUEST, 'DELETE');
Loading history...
34
        }
35
    }
36