Skip to content

Commit b13a1bc

Browse files
authored
Break out quotes method (#43397)
1 parent 6bdc085 commit b13a1bc

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Illuminate/Foundation/Inspiring.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ class Inspiring
5454
* @return string
5555
*/
5656
public static function quote()
57+
{
58+
return static::quotes()
59+
->map(fn ($quote) => static::formatForConsole($quote))
60+
->random();
61+
}
62+
63+
/**
64+
* Get the collection of inspiring quotes.
65+
*
66+
* @return \Illuminate\Support\Collection
67+
*/
68+
public static function quotes()
5769
{
5870
return Collection::make([
5971
'Act only according to that maxim whereby you can, at the same time, will that it should become a universal law. - Immanuel Kant',
@@ -95,7 +107,7 @@ public static function quote()
95107
'The biggest battle is the war against ignorance. - Mustafa Kemal Atatürk',
96108
'Always remember that you are absolutely unique. Just like everyone else. - Margaret Mead',
97109
'You must be the change you wish to see in the world. - Mahatma Gandhi',
98-
])->map(fn ($quote) => static::formatForConsole($quote))->random();
110+
]);
99111
}
100112

101113
/**

0 commit comments

Comments
 (0)