SuggestUsingCorrectDbNameSolution   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 21
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSolutionTitle() 0 4 1
A getSolutionDescription() 0 6 1
A getDocumentationLinks() 0 6 1
1
<?php
2
3
namespace Facade\Ignition\Solutions;
4
5
use Facade\IgnitionContracts\Solution;
6
7
class SuggestUsingCorrectDbNameSolution implements Solution
8
{
9
    public function getSolutionTitle(): string
10
    {
11
        return 'Database name seems incorrect';
12
    }
13
14
    public function getSolutionDescription(): string
15
    {
16
        $defaultDatabaseName = env('DB_DATABASE');
17
18
        return "You're using the default database name `$defaultDatabaseName`. This database does not exist.\n\nEdit the `.env` file and use the correct database name in the `DB_DATABASE` key.";
19
    }
20
21
    public function getDocumentationLinks(): array
22
    {
23
        return [
24
            'Database: Getting Started docs' => 'https://laravel.com/docs/master/database#configuration',
25
        ];
26
    }
27
}
28