DebugHelper   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 13
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A _beforeSuite() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
declare(strict_types = 1);
9
10
namespace PyzTest\Yves\Testify\Helper;
11
12
use Codeception\Module;
13
use Spryker\Shared\ZedRequest\ZedRequestConstants;
14
use SprykerTest\Shared\Testify\Helper\ConfigHelperTrait;
15
16
/**
17
 * This helper enables cookie forwarding to debug Zed during yves - zed requests.
18
 */
19
class DebugHelper extends Module
20
{
21
    use ConfigHelperTrait;
22
23
    /**
24
     * @param array $settings
25
     *
26
     * @return void
27
     */
28
    public function _beforeSuite(array $settings = []): void // phpcs:ignore SlevomatCodingStandard.Functions.UnusedParameter
29
    {
30
        $_COOKIE['XDEBUG_SESSION'] = 'XDEBUG_ECLIPSE'; // phpcs:ignore SlevomatCodingStandard.Variables.DisallowSuperGlobalVariable
31
        $this->getConfigHelper()->setConfig(ZedRequestConstants::TRANSFER_DEBUG_SESSION_FORWARD_ENABLED, true);
32
    }
33
}
34