Test Setup Failed
Push — master ( 0c04d4...384893 )
by Sam
05:17
created

AssociationScheduleController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A showFull() 0 7 1
A showUpcoming() 0 7 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
7
use App\Association;
8
use App\Schedule;
9
10
class AssociationScheduleController extends AssociationAwareController
11
{
12
13
    /**
14
     * Display the specified resource.
15
     *
16
     * @param  int  $id
17
     * @return \Illuminate\Http\Response
18
     */
19
    public function showUpcoming()
20
    {
21
        return view(
0 ignored issues
show
Bug Best Practice introduced by
The expression return view('association...tion->activeSchedules)) returns the type Illuminate\View\View which is incompatible with the documented return type Illuminate\Http\Response.
Loading history...
22
            'association.schedule',
23
            [
24
                'association' => $this->association,
25
                'schedules' => $this->association->activeSchedules,
0 ignored issues
show
Bug introduced by
The property activeSchedules does not seem to exist on App\Association. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
26
            ]
27
        );
28
    }
29
30
    public function showFull($string, Schedule $schedule)
31
    {
32
        return view(
33
            'association.schedule.full',
34
            [
35
                'association' => $this->association,
36
                'schedule' => $schedule,
37
            ]
38
        );
39
    }
40
41
}
42