Completed
Push — master ( 7568a1...4e611e )
by Freek
01:09
created

WebhookConfigRepository::getConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\WebhookClient;
4
5
class WebhookConfigRepository
6
{
7
    /** @var \Spatie\WebhookClient\WebhookConfig[] */
8
    protected $configs;
9
10
    public function addConfig(WebhookConfig $webhookConfig)
11
    {
12
        $this->configs[$webhookConfig->name] = $webhookConfig;
13
    }
14
15
    public function getConfig(string $name): ?WebhookConfig
16
    {
17
        return $this->configs[$name] ?? null;
18
    }
19
}
20