Test Failed
Push — v0.1 ( 3df3e6...629e1b )
by Hennik
13:04 queued 08:54
created

Blueprint::point()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
namespace LaravelSpatial\Schema;
4
5
use Illuminate\Database\Schema\Blueprint as BaseBlueprint;
6
7
/**
8
 * Class Blueprint
9
 * @package LaravelSpatial\Schema
10
 */
11
class Blueprint extends BaseBlueprint
12
{
13 27
    /**
14
     * Create a new point column on the table.
15 27
     *
16
     * @param  string  $column
17
     * @return \Illuminate\Support\Fluent
18
     */
19
    public function point($column)
20
    {
21
        return $this->addColumn('point', $column, ['srid' => null]);
22
    }
23
24 28
    /**
25
     * Enable postgis on this database.
26 28
     * Will create the extension in the database.
27
     *
28
     * @return \Illuminate\Support\Fluent
29
     */
30
    public function enablePostgis()
31
    {
32
        return $this->addCommand('enablePostgis');
33
    }
34
35 27
    /**
36
     * Disable postgis on this database.
37 27
     * WIll drop the extension in the database.
38
     *
39
     * @return \Illuminate\Support\Fluent
40
     */
41
    public function disablePostgis()
42
    {
43
        return $this->addCommand('disablePostgis');
44
    }
45
}
46