Passed
Pull Request — master (#2)
by ANTHONIUS
05:01
created

InteractsWithServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_it_should_required_service_providers() 0 6 2
1
<?php
2
3
/*
4
 * This file is part of the EOffice project.
5
 *
6
 * (c) Anthonius Munthi <https://itstoni.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace EOffice\Testing\Concerns;
15
16
trait InteractsWithServiceProvider
17
{
18
    public function test_it_should_required_service_providers(): void
19
    {
20
        $app       = $this->app;
21
        $providers = $this->getRequiredProviders();
22
        foreach ($providers as $provider) {
23
            $this->assertTrue($app->providerIsLoaded($provider));
0 ignored issues
show
Bug introduced by
It seems like assertTrue() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

23
            $this->/** @scrutinizer ignore-call */ 
24
                   assertTrue($app->providerIsLoaded($provider));
Loading history...
24
        }
25
    }
26
27
    abstract public function getRequiredProviders(): array;
28
}
29