Completed
Branch 2.0 (f08412)
by Zhengchao
01:19
created

CreatesApplication   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createApplication() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of questocat/laravel-referral package.
5
 *
6
 * (c) questocat <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Tests;
13
14
use Illuminate\Contracts\Console\Kernel;
15
16
trait CreatesApplication
17
{
18
    /**
19
     * Creates the application.
20
     *
21
     * Needs to be implemented by subclasses.
22
     *
23
     * @return \Symfony\Component\HttpKernel\HttpKernelInterface
24
     */
25
    public function createApplication()
26
    {
27
        $app = require __DIR__.'/../vendor/laravel/laravel/bootstrap/app.php';
28
29
        $app->make(Kernel::class)->bootstrap();
30
31
        return $app;
32
    }
33
}
34