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.

Code Duplication    Length = 27-28 lines in 3 locations

src/php/Storyplayer/SPv2/Modules/Host/ExpectsFirstHostWithRole.php 1 location

@@ 57-83 (lines=27) @@
54
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
55
 * @link      http://datasift.github.io/storyplayer
56
 */
57
class ExpectsFirstHostWithRole extends ExpectsHost
58
{
59
    // pull in some handy helpers
60
    use HostsByRoleTrait;
61
62
    public function __construct($st, $args)
63
    {
64
        // call our parent constructor first
65
        parent::__construct($st, $args);
66
67
        // $args[0] contains the rolename
68
        // we need to replace this with the hostId for FromHost() to
69
        // function correctly
70
71
        // what are we doing?
72
        $log = usingLog()->startAction("select first host with role '{$this->args[0]}' ...");
73
74
        // get the hosts details
75
        $hostDetails = $this->retrieveFirstHost($this->args[0]);
76
77
        // we only need to remember the hostId
78
        $this->args[0] = $hostDetails->hostId;
79
80
        // all done
81
        $log->endAction("selected host '{$this->args[0]}'");
82
    }
83
}

src/php/Storyplayer/SPv2/Modules/Host/FromFirstHostWithRole.php 1 location

@@ 57-84 (lines=28) @@
54
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
55
 * @link      http://datasift.github.io/storyplayer
56
 */
57
class FromFirstHostWithRole extends FromHost
58
{
59
    // pull in some handy helpers
60
    use HostsByRoleTrait;
61
62
    public function __construct($st, $args)
63
    {
64
        // call our parent constructor first
65
        parent::__construct($st, $args);
66
67
        // $args[0] contains the rolename
68
        // we need to replace this with the hostId for FromHost() to
69
        // function correctly
70
71
        // what are we doing?
72
        $log = usingLog()->startAction("select first host with role '{$this->args[0]}' ...");
73
74
        // get the hosts details
75
        $hostDetails = $this->retrieveFirstHost($this->args[0]);
76
77
        // we only need to remember the name
78
        $this->args[0] = $hostDetails->hostId;
79
80
81
        // all done
82
        $log->endAction("selected host '{$this->args[0]}'");
83
    }
84
}

src/php/Storyplayer/SPv2/Modules/Host/UsingFirstHostWithRole.php 1 location

@@ 57-83 (lines=27) @@
54
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
55
 * @link      http://datasift.github.io/storyplayer
56
 */
57
class UsingFirstHostWithRole extends UsingHost
58
{
59
    // pull in some handy helpers
60
    use HostsByRoleTrait;
61
62
    public function __construct($st, $args)
63
    {
64
        // call our parent constructor first
65
        parent::__construct($st, $args);
66
67
        // $args[0] contains the rolename
68
        // we need to replace this with the hostId for FromHost() to
69
        // function correctly
70
71
        // what are we doing?
72
        $log = usingLog()->startAction("select first host with role '{$this->args[0]}' ...");
73
74
        // get the hosts details
75
        $hostDetails = $this->retrieveFirstHost($this->args[0]);
76
77
        // we only need to remember the name
78
        $this->args[0] = $hostDetails->hostId;
79
80
        // all done
81
        $log->endAction("selected host '{$this->args[0]}'");
82
    }
83
}