IndexFailed   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 6
c 2
b 0
f 0
dl 0
loc 23
ccs 0
cts 17
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A becauseInitiallyTriggeredInTransaction() 0 21 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TddWizard\Fixtures\Catalog;
5
6
class IndexFailed extends \RuntimeException
7
{
8
    public static function becauseInitiallyTriggeredInTransaction(\Exception $previous): self
9
    {
10
        return new self(
11
            <<<TXT
12
The fixture could not be set up because creating index tables does not work within a transaction
13
You can either run the test without wrapping it in a transaction with:
14
15
/**
16
 * @magentoDbIsolation disabled
17
 */
18
19
Or set the fulltext indexer to "scheduled" before the transaction with:
20
21
/**
22
 * @magentoDataFixtureBeforeTransaction Magento/Catalog/_files/enable_reindex_schedule.php
23
 */
24
25
TXT
26
            ,
27
            0,
28
            $previous
29
        );
30
    }
31
}
32