Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Passed
Branch development (ad65b0)
by José
04:05
created

CampaignObserver::published()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace DoeSangue\Observers;
4
5
use DoeSangue\Mail\CampaignPublished;
6
use DoeSangue\Models\Campaign;
7
use DoeSangue\Models\User;
8
use Illuminate\Support\Facades\Mail;
9
10
class CampaignObserver
11
{
12
    /**
13
     * Listen to the Campaign created event.
14
     *
15
     * @param Campaign $Campaign
0 ignored issues
show
Documentation introduced by
There is no parameter named $Campaign. Did you maybe mean $campaign?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
16
     */
17
    public function published(Campaign $campaign)
18
    {
19
        Mail::to($user->email)->send(new CampaignPublished($campaign));
0 ignored issues
show
Bug introduced by
The variable $user does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
Bug introduced by
The call to CampaignPublished::__construct() misses a required argument $user.

This check looks for function calls that miss required arguments.

Loading history...
20
    }
21
22
}
23