Issues (84)

Http/Controllers/AssociationAwareController.php (1 issue)

Severity
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
7
use App\Association;
8
use Illuminate\Support\Arr;
9
10
class AssociationAwareController extends Controller
11
{
12
13
    /**
14
     * @var \App\Association $association
15
     */
16
    protected $association;
17
18
    public function __construct(Request $request) {
0 ignored issues
show
The parameter $request is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
    public function __construct(/** @scrutinizer ignore-unused */ Request $request) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
        $subdomain = Arr::first(explode('.', \Request::getHost()));
20
21
        $this->association = Association::where('subdomain', $subdomain)->first();
22
    }
23
24
}
25