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 — master ( f22c5a...cfdf84 )
by Michael
05:15
created

Lib/Embera/Providers/Twitch.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/**
3
 * Twitch.php
4
 *
5
 * @package Providers
6
 * @author Michael Pratt <[email protected]>
7
 * @link   http://www.michael-pratt.com/
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Embera\Providers;
14
15
/**
16
 * The Twitch Provider
17
 * @link https://github.com/justintv/Twitch-API/blob/master/embed-video.md
18
 */
19
class Twitch extends \Embera\Adapters\Service
20
{
21
    /** inline {@inheritdoc} */
22
    protected $apiUrl = 'https://api.twitch.tv/v4/oembed?format=json';
23
24
    /** inline {@inheritdoc} */
25
    protected function validateUrl()
26
    {
27
        $this->url->convertToHttps();
28
        return (preg_match('~twitch\.tv/videos/(?:[^ ]+)~i', $this->url) || preg_match('~twitch\.tv/(?:[^/]+)/v/(?:[^ ]+)~i', $this->url));
29
    }
30
}
31
32
?>
0 ignored issues
show
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
33