SpecActor   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A expect() 0 1 1
A wait() 0 2 1
A verify() 0 1 1
A usePlugin() 0 1 1
A describe() 0 1 1
A lookAt() 0 2 1
A match() 0 2 1
1
<?php
2
3
namespace PHPKitchen\CodeSpecs\Actor;
4
5
use PHPKitchen\CodeSpecs\Directive\Wait;
6
use PHPKitchen\CodeSpecs\Expectation\Internal\StepsList;
7
use PHPKitchen\CodeSpecs\Expectation\Routing\Router;
8
9
class SpecActor {
10
    public static function describe(string $scenario): void {
0 ignored issues
show
Unused Code introduced by
The parameter $scenario 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

10
    public static function describe(/** @scrutinizer ignore-unused */ string $scenario): void {

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...
11
12
    }
13
14
    public static function verify(string $scenario, callable $verificationSteps = null): void {
0 ignored issues
show
Unused Code introduced by
The parameter $scenario 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 verify(/** @scrutinizer ignore-unused */ string $scenario, callable $verificationSteps = null): void {

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...
Unused Code introduced by
The parameter $verificationSteps 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 verify(string $scenario, /** @scrutinizer ignore-unused */ callable $verificationSteps = null): void {

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
    }
17
18
    public static function expect(string $scenario, callable $verificationSteps = null): void {
0 ignored issues
show
Unused Code introduced by
The parameter $scenario 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 static function expect(/** @scrutinizer ignore-unused */ string $scenario, callable $verificationSteps = null): void {

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...
Unused Code introduced by
The parameter $verificationSteps 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 static function expect(string $scenario, /** @scrutinizer ignore-unused */ callable $verificationSteps = null): void {

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
20
    }
21
22
    public static function match(string $variableName): Router {
23
        return new Router($variableName, Router::DEFERRED_EXPECTATION_MODE);
24
    }
25
26
    /**
27
     * Stops execution for specified number of units of time.
28
     *
29
     * @param int $numberOfTimeUnits number of units of time.
30
     * {@link Wait} specifies what unit should be used.
31
     *
32
     * @return Wait
33
     */
34
    public static function wait($numberOfTimeUnits): Wait {
35
        return new Wait($numberOfTimeUnits, StepsList::getInstance());
36
    }
37
38
    public static function lookAt(string $variableName): Router {
39
        return new Router($variableName);
40
    }
41
42
    public static function usePlugin($plugin) {
0 ignored issues
show
Unused Code introduced by
The parameter $plugin 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

42
    public static function usePlugin(/** @scrutinizer ignore-unused */ $plugin) {

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...
43
44
    }
45
}