GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — develop ( 31696d...d014e0 )
by Stuart
05:40
created

Screen   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 105
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 0
cbo 4
dl 0
loc 105
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A expectsHost() 0 4 1
A expectsLocalhost() 0 4 1
A fromHost() 0 4 1
A fromLocalhost() 0 4 1
A onHost() 0 4 1
A onLocalhost() 0 4 1
1
<?php
2
3
/**
4
 * Copyright (c) 2011-present Mediasift Ltd
5
 * All rights reserved.
6
 *
7
 * Redistribution and use in source and binary forms, with or without
8
 * modification, are permitted provided that the following conditions
9
 * are met:
10
 *
11
 *   * Redistributions of source code must retain the above copyright
12
 *     notice, this list of conditions and the following disclaimer.
13
 *
14
 *   * Redistributions in binary form must reproduce the above copyright
15
 *     notice, this list of conditions and the following disclaimer in
16
 *     the documentation and/or other materials provided with the
17
 *     distribution.
18
 *
19
 *   * Neither the names of the copyright holders nor the names of his
20
 *     contributors may be used to endorse or promote products derived
21
 *     from this software without specific prior written permission.
22
 *
23
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
27
 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
28
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
29
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33
 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34
 * POSSIBILITY OF SUCH DAMAGE.
35
 *
36
 * @category  Libraries
37
 * @package   Storyplayer
38
 * @author    Stuart Herbert <[email protected]>
39
 * @copyright 2011-present Mediasift Ltd www.datasift.com
40
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
41
 * @link      http://datasift.github.io/storyplayer
42
 */
43
44
namespace Storyplayer\SPv2\Modules;
45
46
use DataSift\Storyplayer\PlayerLib\StoryTeller;
47
use Storyplayer\SPv2\Modules\Screen\ExpectsScreen;
48
use Storyplayer\SPv2\Modules\Screen\FromScreen;
49
use Storyplayer\SPv2\Modules\Screen\UsingScreen;
50
51
class Screen
52
{
53
    /**
54
     * returns the ExpectsScreen module
55
     *
56
     * This module provides support for checking on screen sessions running
57
     * on a (possibly) remote machine.  If the check fails, an exception is
58
     * thrown for you.
59
     *
60
     * In SPv1, it was common to call this module directly from your own stories.
61
     * In SPv2, you're much more likely to use one of our multi-host modules or
62
     * helpers (such as usingFirstHostWithRole) so that your stories are as
63
     * test-environment-independent as possible.
64
     *
65
     * @param  string $hostId
66
     *         the ID of the host to use
67
     * @return ExpectsScreen
68
     */
69
    public static function expectsHost($hostId)
70
    {
71
        return new ExpectsScreen(StoryTeller::instance(), [$hostId]);
72
    }
73
74
    /**
75
     * returns the ExpectsScreen module
76
     *
77
     * This module provides support for checking on screen sessions running
78
     * on the machine where Storyplayer is running.  If the check fails, an
79
     * exception is thrown for you.
80
     *
81
     * @return ExpectsScreen
82
     */
83
    public static function expectsLocalhost()
84
    {
85
        return new ExpectsScreen(StoryTeller::instance(), ['localhost']);
86
    }
87
88
    /**
89
     * returns the FromScreen module
90
     *
91
     * This module provides support for checking on the state of screen
92
     * sessions on computers in your test environment.
93
     *
94
     * In SPv1, it was common to call this module directly from your own stories.
95
     * In SPv2, you're much more likely to use one of our multi-host modules or
96
     * helpers (such as usingFirstHostWithRole) so that your stories are as
97
     * test-environment-independent as possible.
98
     *
99
     * @param  string $hostId
100
     *         the ID of the host to use
101
     * @return FromScreen
102
     */
103
    public static function fromHost($hostId)
104
    {
105
        return new FromScreen(StoryTeller::instance(), [$hostId]);
106
    }
107
108
    /**
109
     * returns the FromScreen module
110
     *
111
     * This module provides support for checking on the state of screen
112
     * sessions running on the same computer that Storyplayer is running on.
113
     *
114
     * @return FromScreen
115
     */
116
    public static function fromLocalhost()
117
    {
118
        return new FromScreen(StoryTeller::instance(), ['localhost']);
119
    }
120
121
    /**
122
     * returns the UsingScreen module
123
     *
124
     * This module provides support for running commands on a computer in your
125
     * test environment inside a screen session.
126
     *
127
     * In SPv1, it was common to call this module directly from your own stories.
128
     * In SPv2, you're much more likely to use one of our multi-host modules or
129
     * helpers (such as usingFirstHostWithRole) so that your stories are as
130
     * test-environment-independent as possible.
131
     *
132
     * @param  string $hostId
133
     *         the ID of the host to use
134
     * @return UsingScreen
135
     */
136
    public static function onHost($hostId)
137
    {
138
        return new UsingScreen(StoryTeller::instance(), [$hostId]);
139
    }
140
141
    /**
142
     * returns the UsingScreen module
143
     *
144
     * This module provides support for running commands on the same computer
145
     * that Storyplayer is running on, inside a screen session.
146
     *
147
     * @param  string $hostId
0 ignored issues
show
Bug introduced by
There is no parameter named $hostId. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

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

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

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

Loading history...
148
     *         the ID of the host to use
149
     * @return UsingScreen
150
     */
151
    public static function onLocalhost()
152
    {
153
        return new UsingScreen(StoryTeller::instance(), ['localhost']);
154
    }
155
}
156