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

CreatesApplication::createApplication()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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