CampaignController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 23
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A show() 0 21 1
1
<?php declare(strict_types = 1);
2
3
namespace Diglabby\Doika\Http\Controllers\Widget;
4
5
use App\Http\Controllers\Controller;
6
use Diglabby\Doika\Models\Campaign;
7
use Illuminate\Contracts\Support\Renderable;
8
9
final class CampaignController extends Controller
10
{
11
    public function show(int $compaignId): Renderable
0 ignored issues
show
Unused Code introduced by
The parameter $compaignId 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

11
    public function show(/** @scrutinizer ignore-unused */ int $compaignId): Renderable

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...
12
    {
13
        /** @var Campaign $compaign */
14
//        $compaign = factory(Campaign::class)->make();
15
//        return $compaign;
16
17
        $data = '{
18
          "layout": "form",
19
          "styles": { },
20
          "content": {
21
            "title": "First campaign title",
22
            "description": "First campaign description",
23
            "image": "path_url",
24
            "warnings": {
25
              "cost_error": "invalid cost"
26
            },
27
            "button_values": [ "2", "4", "6", "8", "10", "12" ],
28
            "termsOfUse": {}
29
            }
30
        }';
31
        return view('client.campaign')->withData($data);
32
    }
33
}
34