Passed
Push — master ( 41a424...f04d85 )
by Artem
01:57
created

DatabaseEngines::__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\Databases;
13
14
use Linode\Entity;
15
16
/**
17
 * @property DatabaseTypeEngine[] $mysql      Pricing details for MySQL Managed Databases.
18
 * @property DatabaseTypeEngine[] $postgresql Pricing details for PostgreSQL Managed Databases.
19
 * @property DatabaseTypeEngine[] $mongodb    Pricing details for MongoDB Managed Databases.
20
 */
21
class DatabaseEngines extends Entity
22
{
23
    /**
24
     * @codeCoverageIgnore This method was autogenerated.
25
     */
26
    public function __get(string $name): mixed
27
    {
28
        return array_map(fn ($data) => new DatabaseTypeEngine($this->client, $data), $this->data[$name]);
29
    }
30
}
31