Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.128 |
Changes | 0 |
1 | <?php |
||
40 | 1 | private function runImportLoop( Iterator $entityPageIterator ) { |
|
41 | 1 | $this->shouldStop = false; |
|
42 | |||
43 | /** |
||
44 | * @var EntityPage $entityPage |
||
45 | */ |
||
46 | 1 | foreach ( $entityPageIterator as $entityPage ) { |
|
47 | 1 | $this->importer->import( $entityPage ); |
|
48 | |||
49 | 1 | pcntl_signal_dispatch(); |
|
50 | 1 | if ( $this->shouldStop ) { |
|
51 | if ( $this->onAborted !== null ) { |
||
52 | call_user_func( $this->onAborted, $entityPage->getTitle() ); |
||
53 | } |
||
54 | 1 | return; |
|
55 | } |
||
56 | } |
||
57 | 1 | } |
|
58 | |||
65 |