File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 22
33namespace BlameButton \Laravel \Changelog ;
44
5+ use BlameButton \Laravel \Changelog \Exceptions \ChangelogNotFoundException ;
56use Illuminate \Support \Facades \Storage ;
67
78class Changelog
89{
9- // Build your next great package.
10-
1110 private function getFile (): string
1211 {
1312 return config ('config.file ' , base_path ('CHANGELOG.md ' ));
1413 }
1514
16- public function raw (): ? string
15+ public function raw (): string
1716 {
1817 $ file = $ this ->getFile ();
18+
1919 if (!Storage::exists ($ file )) {
20- return null ;
20+ throw new ChangelogNotFoundException () ;
2121 }
2222
2323 return Storage::get ($ file );
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace BlameButton \Laravel \Changelog \Exceptions ;
4+
5+ use RuntimeException ;
6+
7+ class ChangelogNotFoundException extends RuntimeException
8+ {
9+
10+ }
You can’t perform that action at this time.
0 commit comments