LogManager::createFileDriver()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace MohsenAbrishami\Stethoscope\LogRecord;
4
5
use Illuminate\Support\Manager;
6
use MohsenAbrishami\Stethoscope\LogRecord\Contracts\LogRecordInterface;
7
use MohsenAbrishami\Stethoscope\LogRecord\Drivers\DatabaseDriver;
8
use MohsenAbrishami\Stethoscope\LogRecord\Drivers\FileDriver;
9
10
class LogManager extends Manager
11
{
12
    /**
13
     * Get the default driver name.
14
     *
15
     * @return string
16
     */
17
    public function getDefaultDriver()
18
    {
19
        return config('stethoscope.drivers.log_record');
20
    }
21
22
    /**
23
     * Get an instance of the log driver.
24
     */
25
    public function createFileDriver(): LogRecordInterface
26
    {
27
        return new FileDriver();
28
    }
29
30
    /**
31
     * Get an instance of the log driver.
32
     */
33
    public function createDatabaseDriver(): LogRecordInterface
34
    {
35
        return new DatabaseDriver();
36
    }
37
}
38