Skip to content

Commit

Permalink
Make Twitch::createResourceOwner compatible with parent
Browse files Browse the repository at this point in the history
Fixes #12
  • Loading branch information
dpi committed Sep 17, 2020
1 parent 3719d86 commit 9e0d1f6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Entity/TwitchUser.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?php namespace Depotwarehouse\OAuth2\Client\Twitch\Entity;

use League\OAuth2\Client\Provider\ResourceOwnerInterface;

/**
* Class TwitchUser
* @package Depotwarehouse\OAuth2\Client\Twitch\Entity
*/
class TwitchUser
class TwitchUser implements ResourceOwnerInterface
{
/**
* @var string
*/
protected $name;

/**
* @var string
*/
Expand Down Expand Up @@ -50,7 +52,7 @@ class TwitchUser
*/
public function __construct(array $attributes = array())
{
$this->id = $attributes['_id'];
$this->id = (int) $attributes['_id'];
$this->display_name = $attributes['display_name'];
$this->type = $attributes['type'];
$this->bio = $attributes['bio'];
Expand Down

0 comments on commit 9e0d1f6

Please sign in to comment.