Passed
Push — allow-using-static-facade ( abf22d )
by Chema
04:22
created

Facade   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A informalGreet() 0 5 1
A formalGreet() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GacelaTest\Feature\Framework\StaticFacade\Module;
6
7
use Gacela\Framework\AbstractFacade;
8
9
/**
10
 * @method Factory getFactory()
11
 * @method static Factory factory()
12
 */
13
final class Facade extends AbstractFacade
14
{
15
    public static function informalGreet(string $name): string
16
    {
17
        return self::factory()
18
            ->createInformatGreeter()
19
            ->greet($name);
20
    }
21
22
    public function formalGreet(string $name): string
23
    {
24
        return $this->getFactory()
25
            ->createFormatGreeter()
26
            ->greet($name);
27
    }
28
}
29