Passed
Push — master ( 3501a4...bfa63a )
by Artem
01:45
created

FirewallRules::__get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
// ---------------------------------------------------------------------
4
//
5
//  Copyright (C) 2018-2024 Artem Rodygin
6
//
7
//  You should have received a copy of the MIT License along with
8
//  this file. If not, see <https://opensource.org/licenses/MIT>.
9
//
10
// ---------------------------------------------------------------------
11
12
namespace Linode\Networking;
13
14
use Linode\Entity;
15
16
/**
17
 * A Rule can have up to 255 addresses or networks listed across its IPv4 and IPv6
18
 * arrays. A network and a single IP are treated as equivalent when accounting for
19
 * this limit.
20
 *
21
 * @property FirewallRuleConfig[] $inbound
22
 * @property FirewallRuleConfig[] $outbound
23
 */
24
class FirewallRules extends Entity
25
{
26
    /**
27
     * @codeCoverageIgnore This method was autogenerated.
28
     */
29
    public function __get(string $name): array
30
    {
31
        return array_map(fn ($data) => new FirewallRuleConfig($this->client, $data), $this->data[$name]);
32
    }
33
}
34