Passed
Push — master ( 7c4b7d...f7473d )
by Greg
02:32
created

Blueprint::double()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @package   fisharebest/laravel-floats
4
 * @copyright 2019 "Greg Roach" <[email protected]>
5
 * @licence   MIT
6
 */
7
namespace Fisharebest\LaravelFloats;
8
9
use Illuminate\Database\Schema\Blueprint as BaseBlueprint;
10
use Illuminate\Database\Schema\ColumnDefinition;
11
12
class Blueprint extends BaseBlueprint
13
{
14
    /**
15
     * Create a new float column on the table.
16
     *
17
     * @param  string   $column
18
     * @param  int|null $total
19
     * @param  int|null $places
20
     *
21
     * @return ColumnDefinition
22
     */
23
    public function float($column, $total = null, $places = null)
24
    {
25
        return $this->addColumn('float', $column, compact('total', 'places'));
26
    }
27
}
28