Completed
Push — master ( 9894be...cc7c8f )
by Tobias
21:38
created

GeoJson::dump()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Geocoder package.
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @license    MIT License
11
 */
12
13
namespace Geocoder\Dumper;
14
15
use Geocoder\Location;
16
17
/**
18
 * @author Jan Sorgalla <[email protected]>
19
 */
20
final class GeoJson extends AbstractArrayDumper
21
{
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function dump(Location $location): string
26
    {
27 4
        return json_encode($this->getArray($location));
28 4
    }
29
}
30