DevelopmentErrorLogger::closeStream()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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