Completed
Push — master ( 2e7ae5...1f4f02 )
by Timur
02:34
created

CreateFirewallRuleCommand::identifiedAs()   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 1
1
<?php
2
3
namespace Laravel\Forge\Firewall\Commands;
4
5
class CreateFirewallRuleCommand extends FirewallRuleCommand
6
{
7
    /**
8
     * Set rule name.
9
     *
10
     * @param string $name
11
     *
12
     * @return static
13
     */
14
    public function identifiedAs(string $name)
15
    {
16
        return $this->attachPayload('name', $name);
17
    }
18
19
    /**
20
     * Set rule port number.
21
     *
22
     * @param int $port
23
     *
24
     * @return static
25
     */
26
    public function usingPort(int $port)
27
    {
28
        return $this->attachPayload('port', $port);
29
    }
30
31
    /**
32
     * Set rule ip address.
33
     *
34
     * @param string $ipAddress
35
     *
36
     * @return static
37
     */
38
    public function usingIp(string $ipAddress)
39
    {
40
        return $this->attachPayload('ip_address', $ipAddress);
41
    }
42
}
43