Favicon   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
eloc 6
c 3
b 1
f 0
dl 0
loc 23
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getFaviconColor() 0 3 1
A getFaviconText() 0 3 1
A getFaviconBackgroundColor() 0 3 1
1
<?php
2
3
namespace BeyondCode\LaravelFavicon;
4
5
use Illuminate\Support\Arr;
6
7
class Favicon
8
{
9
    /** @var array */
10
    protected $config;
11
12
    public function __construct(array $config)
13
    {
14
        $this->config = $config;
15
    }
16
17
    public function getFaviconText(string $environment)
18
    {
19
        return Arr::get($this->config, 'enabled_environments.'.$environment.'.text');
20
    }
21
22
    public function getFaviconColor(string $environment)
23
    {
24
        return Arr::get($this->config, 'enabled_environments.'.$environment.'.color');
25
    }
26
27
    public function getFaviconBackgroundColor(string $environment)
28
    {
29
        return Arr::get($this->config, 'enabled_environments.'.$environment.'.background_color');
30
    }
31
}
32