Completed
Push — master ( dab53d...e84b1a )
by Chris
01:22
created

QuoteFactory::getRandomQuote()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Cion\InspirationalQuotes;
4
5
use Illuminate\Support\Collection;
6
7
class QuoteFactory
8
{
9
    public function quotes()
10
    {
11
        return [
12
            [
13
                'quote' => 'When there is no desire, all things are at peace.',
14
                'by' => 'Laozi',
15
                'avatar' => 'https://i.imgur.com/hcfQHVk.png'
16
            ], [
17
                'quote' => 'Simplicity is the ultimate sophistication.',
18
                'by' => 'Leonardo da Vinci',
19
                'avatar' => 'https://i.imgur.com/fk7VpK6.png'
20
            ], [
21
                'quote' => 'Don’t judge each day by the harvest you reap but by the seeds that you plant.',
22
                'by' => 'Robert Louis Stevenson',
23
                'avatar' => 'https://i.imgur.com/I9GMkBS.png'
24
            ], [
25
                'quote' => 'Write it on your heart that every day is the best day in the year.',
26
                'by' => 'Ralph Waldo Emerson',
27
                'avatar' => 'https://i.imgur.com/1v1U8O2.jpg'
28
            ], [
29
                'quote' => 'Every moment is a fresh beginning.',
30
                'by' => 'T.S. Eliot',
31
                'avatar' => 'https://i.imgur.com/AjK9HKF.png'
32
            ], [
33
                'quote' => 'Without His love I can do nothing, with His love there is nothing I cannot do.',
34
                'by' => 'Unknown',
35
                'avatar' => ''
36
            ], [
37
                'quote' => 'Everything you’ve ever wanted is on the other side of fear.',
38
                'by' => 'George Addair',
39
                'avatar' => 'https://i.imgur.com/0YdRYJm.png'
40
            ], [
41
                'quote' => 'Begin at the beginning... and go on till you come to the end: then stop.',
42
                'by' => 'Lewis Carroll',
43
                'avatar' => 'https://i.imgur.com/s4RfIHa.png'
44
            ],
45
        ];
46
    }
47
48
    public function getRandomQuote()
49
    {
50
        return Collection::make($this->quotes())->random();
51
    }
52
}
53