Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Spatie\LaravelIgnition\Solutions;
4
 
5
use Spatie\Ignition\Contracts\Solution;
6
 
7
class SuggestCorrectVariableNameSolution implements Solution
8
{
9
    protected ?string $variableName;
10
 
11
    protected ?string $viewFile;
12
 
13
    protected ?string $suggested;
14
 
15
    public function __construct(string $variableName = null, string $viewFile = null, string $suggested = null)
16
    {
17
        $this->variableName = $variableName;
18
 
19
        $this->viewFile = $viewFile;
20
 
21
        $this->suggested = $suggested;
22
    }
23
 
24
    public function getSolutionTitle(): string
25
    {
26
        return 'Possible typo $'.$this->variableName;
27
    }
28
 
29
    public function getDocumentationLinks(): array
30
    {
31
        return [];
32
    }
33
 
34
    public function getSolutionDescription(): string
35
    {
36
        return "Did you mean `$$this->suggested`?";
37
    }
38
 
39
    public function isRunnable(): bool
40
    {
41
        return false;
42
    }
43
}