Completed
Push — test-EZP-26707-issearchable-fu... ( 774d65...d743e2 )
by
unknown
24:59
created

suppressDepreciationNotices()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
/**
3
 * @license For full copyright and license information view LICENSE file distributed with this source code.
4
 */
5
namespace EzSystems\PlatformBehatBundle\Context\SubContext;
6
7
trait DeprecationNoticeSupressor
8
{
9
    /**
10
     * Stores the original php error reporting value.
11
     */
12
    private $originalErrorReporting;
13
14
    /**
15
     * @BeforeScenario
16
     */
17
    public function suppressDepreciationNotices()
18
    {
19
        $this->originalErrorReporting = error_reporting(E_ALL & ~E_USER_DEPRECATED);
20
    }
21
22
    /**
23
     * @AfterScenario
24
     */
25
    public function restoreErrorReporting()
26
    {
27
        error_reporting($this->originalErrorReporting);
28
    }
29
}
30