Test Failed
Push — ft/states ( d4f7ca...0e1fde )
by Ben
09:10
created

TestFeaturedAssistant   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A archive() 0 5 1
A register() 0 4 1
1
<?php
2
3
namespace Thinktomorrow\Chief\States\Featurable;
4
5
use Illuminate\Http\Request;
6
7
class TestFeaturedAssistant
8
{
9
    // define routes and their endpoints
10
    // default AssistantController guides to the Assistant to convention method like managers:
11
    // e.g. Route::post('pages/archive', [AssistantController, 'archive']); -> archive method is propagated to
12
    // ArchiveAssistant@archive
13
14
    public static function register($app)
0 ignored issues
show
Unused Code introduced by
The parameter $app 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

14
    public static function register(/** @scrutinizer ignore-unused */ $app)

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...
15
    {
16
         Route::get('testje', [static::class, 'archive']);
0 ignored issues
show
Bug introduced by
The type Thinktomorrow\Chief\States\Featurable\Route was not found. Did you mean Route? If so, make sure to prefix the type with \.
Loading history...
17
         Route::get('testje', [AssistantController, 'archive']);
0 ignored issues
show
Bug introduced by
The constant Thinktomorrow\Chief\Stat...ble\AssistantController was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
18
19
         // fetched manager
20
        // propagate naar assistant::archive
21
    }
22
23
    public function archive(Request $request)
0 ignored issues
show
Unused Code introduced by
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

23
    public function archive(/** @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...
24
    {
25
        // Get manager
26
27
        $this->model->archive();
0 ignored issues
show
Bug Best Practice introduced by
The property model does not exist on Thinktomorrow\Chief\Stat...e\TestFeaturedAssistant. Did you maybe forget to declare it?
Loading history...
28
    }
29
}
30