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

src/Lifx.php 2 locations

@@ 92-103 (lines=12) @@
89
     * @param float $duration (Optional) Fade to the given `state` over a duration of seconds. Defaults to `1.0`.
90
     * @return \Psr\Http\Message\StreamInterface
91
     */
92
    public function setLights($selector = 'all', $state = 'on', $duration = 1.0)
93
    {
94
        $request = new Request('PUT', 'lights/' . $selector . '/power');
95
        $response = $this->sendRequest($request,[
96
            'query' => [
97
                'state' => $state,
98
                'duration' => $duration
99
            ]
100
        ]);
101
102
        return $response->getBody();
103
    }
104
105
    /**
106
     * Set lights to any color.
@@ 114-126 (lines=13) @@
111
     * @param bool $power_on (Optional) Whether to turn light on first. Defaults to `true`.
112
     * @return \Psr\Http\Message\StreamInterface
113
     */
114
    public function setColor($selector = 'all', $color = 'white', $duration = 1.0, $power_on = true)
115
    {
116
        $request = new Request('PUT', 'lights/' . $selector . '/color');
117
        $response = $this->sendRequest($request,[
118
            'query' => [
119
                'color' => $color,
120
                'duration' => $duration,
121
                'power_on' => $power_on,
122
            ]
123
        ]);
124
125
        return $response->getBody();
126
    }
127
128
    /**
129
     * Performs a breathe effect by slowly fading between the given colors.