Updated coding standards
This commit is contained in:
parent
dcf4e948e7
commit
65c08825a5
|
@ -137,8 +137,11 @@ class Spotify extends OAuth2
|
|||
protected function getUser(string $accessToken)
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
$this->user = \json_decode($this->request('GET',
|
||||
$this->resourceEndpoint . "me", ['Authorization: Bearer '.\urlencode($accessToken)]), true);
|
||||
$this->user = \json_decode($this->request(
|
||||
'GET',
|
||||
$this->resourceEndpoint . "me",
|
||||
['Authorization: Bearer '.\urlencode($accessToken)]
|
||||
), true);
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
|
|
|
@ -139,8 +139,11 @@ class Twitch extends OAuth2
|
|||
protected function getUser(string $accessToken)
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
$this->user = \json_decode($this->request('GET',
|
||||
$this->resourceEndpoint, ['Authorization: Bearer '.\urlencode($accessToken)]), true)['data']['0'];
|
||||
$this->user = \json_decode($this->request(
|
||||
'GET',
|
||||
$this->resourceEndpoint,
|
||||
['Authorization: Bearer '.\urlencode($accessToken)]
|
||||
), true)['data']['0'];
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
|
|
|
@ -153,8 +153,11 @@ class Yahoo extends OAuth2
|
|||
protected function getUser(string $accessToken)
|
||||
{
|
||||
if (empty($this->user)) {
|
||||
$this->user = \json_decode($this->request('GET',
|
||||
$this->resourceEndpoint, ['Authorization: Bearer '.\urlencode($accessToken)]), true);
|
||||
$this->user = \json_decode($this->request(
|
||||
'GET',
|
||||
$this->resourceEndpoint,
|
||||
['Authorization: Bearer '.\urlencode($accessToken)]
|
||||
), true);
|
||||
}
|
||||
|
||||
return $this->user;
|
||||
|
|
|
@ -78,7 +78,7 @@ class Storage
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
static public function human($bytes, $decimals = 2)
|
||||
public static function human($bytes, $decimals = 2)
|
||||
{
|
||||
$units = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
|
||||
$step = 1024;
|
||||
|
|
|
@ -13,7 +13,7 @@ class URL
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
static public function parse(string $url):array
|
||||
public static function parse(string $url):array
|
||||
{
|
||||
$default = [
|
||||
'scheme' => '',
|
||||
|
@ -39,7 +39,7 @@ class URL
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
static public function unparse(array $url, array $ommit = []):string
|
||||
public static function unparse(array $url, array $ommit = []):string
|
||||
{
|
||||
if (isset($url['path']) && \mb_substr($url['path'], 0, 1) !== '/') {
|
||||
$url['path'] = '/'.$url['path'];
|
||||
|
@ -85,7 +85,7 @@ class URL
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
static public function parseQuery(string $query):array
|
||||
public static function parseQuery(string $query):array
|
||||
{
|
||||
\parse_str($query, $result);
|
||||
|
||||
|
@ -101,7 +101,7 @@ class URL
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
static public function unparseQuery(array $query):string
|
||||
public static function unparseQuery(array $query):string
|
||||
{
|
||||
return \http_build_query($query);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue