Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #62 from PavelJurasek/patch-1
Browse files Browse the repository at this point in the history
Remove usage of Nette\Object class
  • Loading branch information
enumag authored Apr 12, 2018
2 parents 903849c + acd2167 commit 5fe0ce4
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ env:
matrix:
- NETTE=nette-2.4-dev
- NETTE=nette-2.4
- NETTE=nette-2.3

matrix:
include:
- php: 5.6
env: NETTE=nette-2.3 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
env: NETTE=nette-2.4 COMPOSER_EXTRA_ARGS="--prefer-lowest --prefer-stable"
- php: 7.0
env: NETTE=nette-2.4 COVERAGE="--coverage ./coverage.xml --coverage-src ./src" TESTER_RUNTIME="phpdbg"
exclude:
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/Api/CurlClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@
* @method onError(\Kdyby\Facebook\Exception $e, array $info)
* @method onSuccess(array $result, array $info)
*/
class CurlClient extends Nette\Object implements Facebook\ApiClient
class CurlClient implements Facebook\ApiClient
{

use Nette\SmartObject;

/**
* Default options for curl.
* @var array
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class Configuration extends Nette\Object
class Configuration
{

use Nette\SmartObject;

/** @deprecated */
const USER_EMAIL = 'email';
/** @deprecated */
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/Diagnostics/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@
* @property callable $failure
* @property callable $success
*/
class Panel extends Nette\Object implements IBarPanel
class Panel implements IBarPanel
{

use Nette\SmartObject;

/**
* @var int logged time
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
*
* @author Naitik Shah <[email protected]>
*/
class Facebook extends Nette\Object
class Facebook
{

use Nette\SmartObject;

/**
* Version.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/Kdyby/Facebook/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
namespace Kdyby\Facebook;

use Nette;
use Tracy\Debugger;
use Nette\Utils\Strings;



/**
* @author Filip Procházka <[email protected]>
*/
class Helpers extends Nette\Object
class Helpers
{

use Nette\SmartObject;

/**
* Return true if this is video post.
*
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
* @property string $pictureUrl
* @property array $permissions
*/
class Profile extends Nette\Object
class Profile
{

use Nette\SmartObject;

/**
* @var Facebook
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Kdyby/Facebook/Resource/ResourceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@

use Iterator;
use IteratorIterator;
use Nette\Object;
use Nette\SmartObject;
use Nette\Utils\ArrayHash;



/**
* @author Martin Štekl <[email protected]>
*/
class ResourceIterator extends Object implements Iterator
class ResourceIterator implements Iterator
{

use SmartObject;

/**
* @var \Kdyby\Facebook\Resource\IResourceLoader
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Kdyby/Facebook/Resource/ResourceLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

use IteratorAggregate;
use Kdyby\Facebook\Facebook;
use Nette\Object;
use Nette\SmartObject;
use Nette\Utils\ArrayHash;
use Traversable;

Expand All @@ -21,9 +21,11 @@
/**
* @author Martin Štekl <[email protected]>
*/
class ResourceLoader extends Object implements IteratorAggregate, IResourceLoader
class ResourceLoader implements IteratorAggregate, IResourceLoader
{

use SmartObject;

/**
* @var \Kdyby\Facebook\Facebook
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/SessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
* @property string $access_token
* @property string $user_id
*/
class SessionStorage extends Nette\Object
class SessionStorage
{

use Nette\SmartObject;

const FBSS_COOKIE_NAME = 'fbss';

// We can set this to a high number because the main session
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Facebook/SignedRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class SignedRequest extends Nette\Object
class SignedRequest
{

use Nette\SmartObject;

/**
* Parses a signed_request and validates the signature.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/KdybyTests/Facebook/Facebook_v2_0.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Facebook_v2_0Test extends FacebookTestCase
{
$facebook = $this->createWithRequest();

$response = $facebook->api('/' . $this->testUser->id);
$response = $facebook->api('/' . $this->testUser->id . '?fields=id,name,first_name,last_name');
Assert::true(isset($response['id'])); // User ID should be public.
Assert::true(isset($response['name'])); // User's name should be public.
Assert::true(isset($response['first_name'])); // User's first name should be public.
Expand Down
2 changes: 1 addition & 1 deletion tests/KdybyTests/Facebook/Facebook_v2_1.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Facebook_v2_1Test extends FacebookTestCase
{
$facebook = $this->createWithRequest();

$response = $facebook->api('/' . $this->testUser->id);
$response = $facebook->api('/' . $this->testUser->id . '?fields=id,name,first_name,last_name');
Assert::true(isset($response['id'])); // User ID should be public.
Assert::true(isset($response['name'])); // User's name should be public.
Assert::true(isset($response['first_name'])); // User's first name should be public.
Expand Down
2 changes: 1 addition & 1 deletion tests/KdybyTests/Facebook/Facebook_v2_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Facebook_v2_2Test extends FacebookTestCase
{
$facebook = $this->createWithRequest();

$response = $facebook->api('/' . $this->testUser->id);
$response = $facebook->api('/' . $this->testUser->id . '?fields=id,name,first_name,last_name');
Assert::true(isset($response['id'])); // User ID should be public.
Assert::true(isset($response['name'])); // User's name should be public.
Assert::true(isset($response['first_name'])); // User's first name should be public.
Expand Down
2 changes: 1 addition & 1 deletion tests/KdybyTests/Facebook/Facebook_v2_3.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ class Facebook_v2_3Test extends FacebookTestCase
{
$facebook = $this->createWithRequest();

$response = $facebook->api('/' . $this->testUser->id);
$response = $facebook->api('/' . $this->testUser->id . '?fields=id,name,first_name,last_name');
Assert::true(isset($response['id'])); // User ID should be public.
Assert::true(isset($response['name'])); // User's name should be public.
Assert::true(isset($response['first_name'])); // User's first name should be public.
Expand Down

0 comments on commit 5fe0ce4

Please sign in to comment.