Blueprint   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 38
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSchemaManager() 0 7 2
A getConfig() 0 3 1
1
<?php
2
3
namespace Reedware\LaravelBlueprints;
4
5
use Illuminate\Support\Arr;
6
use Illuminate\Support\Facades\DB;
7
use Illuminate\Database\Connection;
8
use Illuminate\Database\Schema\Blueprint as TableBlueprint;
9
10
class Blueprint extends TableBlueprint
11
{
12
    use Concerns\Columns,
13
        Concerns\BelongsTo,
14
        Concerns\MorphsTo,
15
        Concerns\Decimals,
16
        Concerns\ForeignKeys,
17
        Concerns\TimestampsBy,
18
        Concerns\SoftDeletesBy,
19
        Concerns\Indexes;
20
21
    /**
22
     * Returns the Schema Manager for the specified Connection.
23
     *
24
     * @param  \Illuminate\Database\Connection  $connection
25
     *
26
     * @return \Doctrine\DBAL\Schema\AbstractSchemaManager
0 ignored issues
show
Bug introduced by
The type Doctrine\DBAL\Schema\AbstractSchemaManager 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...
27
     */
28
    public function getSchemaManager(Connection $connection = null)
29
    {
30
        // Determine the Connection
31
        $connection = $connection ?: DB::connection();
32
33
        // Return the Schema Manager
34
        return $connection->getDoctrineSchemaManager();
35
    }
36
37
    /**
38
     * Returns the specified Configuration Value.
39
     *
40
     * @param  string|null  $key
41
     * @param  mixed        $value
42
     *
43
     * @return mixed
44
     */
45
    public function getConfig($key = null, $value = null)
46
    {
47
        return Arr::get(config('blueprints'), $key, $value);
0 ignored issues
show
Bug introduced by
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

47
        return Arr::get(/** @scrutinizer ignore-call */ config('blueprints'), $key, $value);
Loading history...
48
    }
49
}