Completed
Pull Request — master (#87)
by Rémi
04:56
created

Geotools::vertex()   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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Geotools library.
5
 *
6
 * (c) Antoine Corcy <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace League\Geotools;
13
14
use Geocoder\Geocoder;
15
use League\Geotools\Batch\Batch;
16
use League\Geotools\Convert\Convert;
17
use League\Geotools\Coordinate\CoordinateInterface;
18
use League\Geotools\Distance\Distance;
19
use League\Geotools\Edge\Edge;
20
use League\Geotools\Geohash\Geohash;
21
22
/**
23
 * Geotools class
24
 *
25
 * @author Antoine Corcy <[email protected]>
26
 */
27
class Geotools extends AbstractGeotools implements GeotoolsInterface
28
{
29
    /**
30
     * Version.
31
     * @see http://semver.org/
32
     */
33
    const VERSION = '0.7.1-dev';
34
35
36
    /**
37
     * {@inheritDoc}
38
     */
39 29
    public function distance()
40
    {
41 29
        return new Distance;
42
    }
43
44
    /**
45
     * {@inheritDoc}
46
     */
47 15
    public function edge()
48
    {
49 15
        return new Edge;
50
    }
51
52
    /**
53
     * {@inheritDoc}
54
     */
55 1
    public function batch(Geocoder $geocoder)
56
    {
57 1
        return new Batch($geocoder);
58
    }
59
60
    /**
61
     * {@inheritDoc}
62
     */
63 8
    public function geohash()
64
    {
65 8
        return new Geohash;
66
    }
67
68
    /**
69
     * {@inheritDoc}
70
     */
71 13
    public function convert(CoordinateInterface $coordinates)
72
    {
73 13
        return new Convert($coordinates);
74
    }
75
}
76