LocaleAttributeBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 3 1
1
<?php
2
3
namespace ArinaSystems\JsonResponse\Builders;
4
5
use Illuminate\Support\Facades\Config;
6
7
class LocaleAttributeBuilder extends Builder
8
{
9
    /**
10
     * Build a value of the attribute.
11
     *
12
     * @param  string|null  $locale
13
     * @return string
14
     */
15
    public function build($locale = null)
16
    {
17
        return $locale ?? Config::get('app.locale');
18
    }
19
}
20