Completed
Push — master ( 888206...b6dc05 )
by Davide
03:38
created

ResponsiveQuoteController::index()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace DavideCasiraghi\PhpResponsiveRandomQuote\Http\Controllers;
4
5
use DavideCasiraghi\PhpResponsiveRandomQuote\Facades\PhpResponsiveQuote;
6
7
class ResponsiveQuoteController
8
{
9
    /*public function __invoke()
10
    {
11
        //return PhpResponsiveQuote::getRandomQuote();
12
        dd("asd 1");
13
        return view('php-responsive-quote::show', [
14
            'quote' => PhpResponsiveQuote::getRandomQuote(),
15
        ]);
16
    }*/
17
    
18
    
19
    /**
20
     * Display the specified resource.
21
     *
22
     * @return \Illuminate\Http\Response
23
     */
24 1
    public function index()
25
    {
26 1
        $quote = PhpResponsiveQuote::getRandomQuote();
0 ignored issues
show
Bug introduced by
The method getRandomQuote() does not exist on DavideCasiraghi\PhpRespo...ades\PhpResponsiveQuote. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

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

26
        /** @scrutinizer ignore-call */ 
27
        $quote = PhpResponsiveQuote::getRandomQuote();
Loading history...
27
        
28
        // the view name is set in the - Service provider - boot - loadViewsFrom
29 1
        return view('php-responsive-quote::index', [
30 1
            'quoteAuthor' => $quote['author'],
31 1
            'quoteText' => $quote['text'],
32
        ]);
33
    }
34
    
35
    
36
}
37