Test Setup Failed
Push — main ( 9553a4...d149ac )
by Davide
08:15
created

StaticPageController   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 42
ccs 0
cts 4
cp 0
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A aboutMe() 0 3 1
A contactImprovisation() 0 6 1
A treatments() 0 3 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use App\Models\Post;
6
use App\Services\Snippets\GalleryMasonryService;
7
use App\Services\StaticPageService;
8
use Illuminate\Http\Request;
9
10
class StaticPageController extends Controller
11
{
12
    private StaticPageService $staticPageService;
13
14
    public function __construct(
15
        StaticPageService $staticPageService
16
    ) {
17
        $this->staticPageService = $staticPageService;
18
    }
19
20
    /**
21
     * Show the about me page.
22
     *
23
     * @return \Illuminate\Contracts\Support\Renderable
24
     */
25
    public function aboutMe()
26
    {
27
      return view('pages.aboutMe');
28
    }
29
30
    /**
31
     * Show the treatments page.
32
     *
33
     * @return \Illuminate\Contracts\Support\Renderable
34
     */
35
    public function treatments()
36
    {
37
        return view('pages.treatments');
38
    }
39
40
    /**
41
     * Show the Contact Improvisation page.
42
     *
43
     * @return \Illuminate\Contracts\Support\Renderable
44
     * @throws \Spatie\ModelStatus\Exceptions\InvalidStatus
45
     */
46
    public function contactImprovisation()
47
    {
48
        $gallery1Html = $this->staticPageService->getStaticGalleryHtml('contact improvisation', true);
49
50
        return view('pages.contactImprovisation', [
51
            'gallery1Html' => $gallery1Html,
52
        ]);
53
    }
54
}
55