Issues (3)

src/Blueprint.php (2 issues)

1
<?php
2
/**
3
 * @package   fisharebest/laravel-floats
4
 * @copyright 2020 "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;
0 ignored issues
show
The type Illuminate\Database\Schema\ColumnDefinition was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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
     * @param  bool|null $unsigned
21
     *
22
     * @return ColumnDefinition
23
     */
24
    public function float($column, $total = null, $places = null, $unsigned = false)
25
    {
26
        return $this->addColumn('float', $column, compact('total', 'places', 'unsigned'));
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->addColumn(... 'places', 'unsigned')) returns the type Illuminate\Support\Fluent which is incompatible with the documented return type Illuminate\Database\Schema\ColumnDefinition.
Loading history...
27
    }
28
}
29