Completed
Push — master ( 4672bf...c09367 )
by Vladimir
02:46
created

Application::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A Application::version() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace FondBot\Framework;
6
7
use FondBot\Foundation\Kernel;
8
use FondBot\Framework\Http\Kernel as HttpKernel;
9
use FondBot\Framework\Console\Kernel as ConsoleKernel;
10
use Illuminate\Foundation\Application as BaseApplication;
11
use Illuminate\Contracts\Http\Kernel as HttpKernelContract;
12
use FondBot\Framework\Exceptions\Handler as ExceptionsHandler;
13
use Illuminate\Contracts\Console\Kernel as ConsoleKernelContract;
14
use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract;
15
16
class Application extends BaseApplication
17
{
18
    /** {@inheritdoc} */
19
    public function version(): string
20
    {
21
        return Kernel::VERSION;
22
    }
23
24
    /** {@inheritdoc} */
25
    public function configPath($path = ''): string
26
    {
27
        return $this->basePath('vendor/fondbot/framework/config');
28
    }
29
30
    /** {@inheritdoc} */
31
    protected function registerBaseBindings(): void
32
    {
33
        parent::registerBaseBindings();
34
35
        $this->singleton(HttpKernelContract::class, HttpKernel::class);
36
        $this->singleton(ConsoleKernelContract::class, ConsoleKernel::class);
37
        $this->singleton(ExceptionHandlerContract::class, ExceptionsHandler::class);
38
    }
39
}
40