DevelopmentErrorLogger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 18
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A openStream() 0 3 1
A closeStream() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Plaisio\ErrorLogger;
5
6
/**
7
 * An error logger for development purposes. It will show all information of the error on the user's screen. Use this
8
 * error logger on development environments only.
9
 */
10
class DevelopmentErrorLogger extends CoreErrorLogger
11
{
12
  //--------------------------------------------------------------------------------------------------------------------
13
  /**
14
   * Opens output.
15
   */
16
  protected function openStream(): void
17
  {
18
    $this->handle = fopen('php://output', 'wb');
19
  }
20
21
  //--------------------------------------------------------------------------------------------------------------------
22
  /**
23
   * {@inheritdoc}
24
   */
25
  protected function closeStream(): void
26
  {
27
    fclose($this->handle);
28
  }
29
30
  //--------------------------------------------------------------------------------------------------------------------
31
}
32
33
//----------------------------------------------------------------------------------------------------------------------
34