Passed
Push — 2.x ( 9569a0...05c456 )
by Fabrice
02:19
created

LineExtractor::getExtracted()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
c 0
b 0
f 0
nc 3
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
/*
4
 * This file is part of YaEtl
5
 *     (c) Fabrice de Stefanis / https://github.com/fab2s/YaEtl
6
 * This source file is licensed under the MIT license which you will
7
 * find in the LICENSE file or at https://opensource.org/licenses/MIT
8
 */
9
10
namespace fab2s\YaEtl\Extractors\File;
11
12
/**
13
 * Class LineExtractor
14
 */
15
class LineExtractor extends FileExtractorAbstract
16
{
17
    /**
18
     * @return iterable
19
     */
20
    protected function getExtracted(): iterable
21
    {
22
        if (!$this->readBom()) {
23
            return;
24
        }
25
26
        while (null !== ($line = $this->getNextNonEmptyLine())) {
27
            yield $line;
28
        }
29
    }
30
}
31