Passed
Pull Request — main (#55)
by mohsen
12:11
created

LogManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 19
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createLogDriver() 0 3 1
A getDefaultDriver() 0 3 1
1
<?php
2
3
use Illuminate\Support\Manager;
4
use MohsenAbrishami\Stethoscope\LogRecord\Contracts\LogRecordInterface;
5
6
class LogManager extends Manager
7
{
8
    /**
9
     * Get the default driver name.
10
     *
11
     * @return string
12
     */
13
    public function getDefaultDriver()
14
    {
15
        return config('stethoscope.drivers.log');
16
    }
17
    /**
18
     * Get an instance of the log driver.
19
     *
20
     * @return LogRecordInterface
21
     */
22
    public function createLogDriver(): LogRecordInterface
23
    {
24
        return new LogRecordInterface();
25
    }
26
}
27