aboutsummaryrefslogtreecommitdiff
path: root/tests/mocks/MockParser.php
blob: 39c369c1fa29acddfb208379c4f5ddb47c57d220 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
declare(strict_types=1);

/**
 * @author: Alexander Kiryukhin <alexander@kiryukhin.su>
 * @license: MIT
 */

use NeonXP\Dotenv\Parser\ParserInterface;
use NeonXP\Dotenv\Types\KeyValue;

/**
 * Class MockParser
 */
class MockParser implements ParserInterface
{

    /**
     * @param string $line
     * @return KeyValue
     */
    public function parseLine(string $line): KeyValue
    {
        list($key, $value) = explode("=", $line);

        return new KeyValue($key, $value);
    }
}