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 = 40-40 lines in 2 locations

src/php/DataSift/Storyplayer/Cli/CreateStory/BasedOnSwitch.php 1 location

@@ 61-100 (lines=40) @@
58
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
59
 * @link      http://datasift.github.io/storyplayer
60
 */
61
class CreateStory_BasedOnSwitch extends CliSwitch
62
{
63
    public function __construct()
64
    {
65
        // define our name, and our description
66
        $this->setName('basedOn');
67
        $this->setShortDescription('base your new story on a StoryTemplate');
68
69
        // what are the short switches?
70
        $this->addShortSwitch('b');
71
72
        // what are the long switches?
73
        $this->addLongSwitch('based-on');
74
75
        // what is the required argument?
76
        $this->setRequiredArg('<classname>', "the StoryTemplate class to base your new story on");
77
        $this->setArgValidator(new MustBeValidStoryTemplate);
78
79
        // this argument is repeatable
80
        $this->setSwitchIsRepeatable();
81
82
        // all done
83
    }
84
85
    /**
86
     * @param  CliEngine $engine
87
     * @param  integer   $invokes
88
     * @param  array     $params
89
     * @param  boolean   $isDefaultParam
90
     * @return CliResult
91
     */
92
    public function process(CliEngine $engine, $invokes = 1, $params = array(), $isDefaultParam = false)
93
    {
94
        // remember the setting
95
        $engine->options->basedOn = $params;
96
97
        // tell the engine that it is done
98
        return new CliResult(CliResult::PROCESS_CONTINUE);
99
    }
100
}

src/php/DataSift/Storyplayer/Cli/CreateTestEnv/BasedOnSwitch.php 1 location

@@ 61-100 (lines=40) @@
58
 * @license   http://www.opensource.org/licenses/bsd-license.php  BSD License
59
 * @link      http://datasift.github.io/storyplayer
60
 */
61
class CreateTestEnv_BasedOnSwitch extends CliSwitch
62
{
63
    public function __construct()
64
    {
65
        // define our name, and our description
66
        $this->setName('basedOn');
67
        $this->setShortDescription('base your new test environment on a TestEnvironmentTemplate');
68
69
        // what are the short switches?
70
        $this->addShortSwitch('b');
71
72
        // what are the long switches?
73
        $this->addLongSwitch('based-on');
74
75
        // what is the required argument?
76
        $this->setRequiredArg('<classname>', "the TestEnvironmentTemplate class to base your new test environment on");
77
        $this->setArgValidator(new MustBeValidStoryTemplate);
78
79
        // this argument is repeatable
80
        $this->setSwitchIsRepeatable();
81
82
        // all done
83
    }
84
85
    /**
86
     * @param  CliEngine $engine
87
     * @param  integer   $invokes
88
     * @param  array     $params
89
     * @param  boolean   $isDefaultParam
90
     * @return CliResult
91
     */
92
    public function process(CliEngine $engine, $invokes = 1, $params = array(), $isDefaultParam = false)
93
    {
94
        // remember the setting
95
        $engine->options->basedOn = $params;
96
97
        // tell the engine that it is done
98
        return new CliResult(CliResult::PROCESS_CONTINUE);
99
    }
100
}
101