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

Facade::formalGreet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
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