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

FirewallRules   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 1
b 0
f 0
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __get() 0 3 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