LogManager   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
c 0
b 0
f 0
dl 0
loc 26
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getDefaultDriver() 0 3 1
A createDatabaseDriver() 0 3 1
A createFileDriver() 0 3 1
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