Completed
Push — master ( 3cc9b0...d35865 )
by Timur
02:56
created

resourcePath()   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\Certificates\Commands;
4
5
use InvalidArgumentException;
6
7
class ObtainLetsEncryptCertificateCommand extends CertificateCommand
8
{
9
    /**
10
     * Resource path.
11
     *
12
     * @return string
13
     */
14
    public function resourcePath()
15
    {
16
        return 'letsencrypt';
17
    }
18
19
    /**
20
     * Set LetsEncrypt certificate domains.
21
     *
22
     * @param string|array $domain
0 ignored issues
show
Documentation introduced by
There is no parameter named $domain. Did you maybe mean $domains?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
23
     *
24
     * @return static
25
     */
26
    public function usingDomains($domains)
27
    {
28
        if (is_string($domains)) {
29
            $domains = [$domains];
30
        } elseif (!is_array($domains)) {
31
            throw new InvalidArgumentException('Domains must be a string or array.');
32
        }
33
34
        return $this->attachPayload('domains', $domains);
35
    }
36
}
37