Completed
Push — travis_trusty ( b242e6...daf958 )
by André
17:21
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 1
Metric Value
dl 0
loc 4
rs 10
c 1
b 0
f 1
cc 1
eloc 2
nc 1
nop 0
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