From 9b2adacc8f8a363145790b32a986243a5f27f7f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jura=CC=81sek?= Date: Wed, 6 Dec 2017 13:16:57 +0100 Subject: [PATCH] Remove usage of Nette\Object class --- src/Kdyby/Facebook/Api/CurlClient.php | 4 +++- src/Kdyby/Facebook/Configuration.php | 4 +++- src/Kdyby/Facebook/Diagnostics/Panel.php | 4 +++- src/Kdyby/Facebook/Facebook.php | 4 +++- src/Kdyby/Facebook/Helpers.php | 6 +++--- src/Kdyby/Facebook/Profile.php | 4 +++- src/Kdyby/Facebook/Resource/ResourceIterator.php | 6 ++++-- src/Kdyby/Facebook/Resource/ResourceLoader.php | 6 ++++-- src/Kdyby/Facebook/SessionStorage.php | 4 +++- src/Kdyby/Facebook/SignedRequest.php | 4 +++- 10 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/Kdyby/Facebook/Api/CurlClient.php b/src/Kdyby/Facebook/Api/CurlClient.php index b8111e3c..c83f1842 100755 --- a/src/Kdyby/Facebook/Api/CurlClient.php +++ b/src/Kdyby/Facebook/Api/CurlClient.php @@ -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 diff --git a/src/Kdyby/Facebook/Configuration.php b/src/Kdyby/Facebook/Configuration.php index 85a16494..02158c84 100755 --- a/src/Kdyby/Facebook/Configuration.php +++ b/src/Kdyby/Facebook/Configuration.php @@ -18,9 +18,11 @@ /** * @author Filip Procházka */ -class Configuration extends Nette\Object +class Configuration { + use Nette\SmartObject; + /** @deprecated */ const USER_EMAIL = 'email'; /** @deprecated */ diff --git a/src/Kdyby/Facebook/Diagnostics/Panel.php b/src/Kdyby/Facebook/Diagnostics/Panel.php index c694394f..a52f3e51 100644 --- a/src/Kdyby/Facebook/Diagnostics/Panel.php +++ b/src/Kdyby/Facebook/Diagnostics/Panel.php @@ -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 */ diff --git a/src/Kdyby/Facebook/Facebook.php b/src/Kdyby/Facebook/Facebook.php index 8aed0b85..d3002ae2 100644 --- a/src/Kdyby/Facebook/Facebook.php +++ b/src/Kdyby/Facebook/Facebook.php @@ -29,9 +29,11 @@ * * @author Naitik Shah */ -class Facebook extends Nette\Object +class Facebook { + use Nette\SmartObject; + /** * Version. */ diff --git a/src/Kdyby/Facebook/Helpers.php b/src/Kdyby/Facebook/Helpers.php index 0714712a..dbe419b5 100644 --- a/src/Kdyby/Facebook/Helpers.php +++ b/src/Kdyby/Facebook/Helpers.php @@ -11,17 +11,17 @@ namespace Kdyby\Facebook; use Nette; -use Tracy\Debugger; -use Nette\Utils\Strings; /** * @author Filip Procházka */ -class Helpers extends Nette\Object +class Helpers { + use Nette\SmartObject; + /** * Return true if this is video post. * diff --git a/src/Kdyby/Facebook/Profile.php b/src/Kdyby/Facebook/Profile.php index d1eb2f53..13cdc6bf 100644 --- a/src/Kdyby/Facebook/Profile.php +++ b/src/Kdyby/Facebook/Profile.php @@ -22,9 +22,11 @@ * @property string $pictureUrl * @property array $permissions */ -class Profile extends Nette\Object +class Profile { + use Nette\SmartObject; + /** * @var Facebook */ diff --git a/src/Kdyby/Facebook/Resource/ResourceIterator.php b/src/Kdyby/Facebook/Resource/ResourceIterator.php index 75d91967..8091ef80 100644 --- a/src/Kdyby/Facebook/Resource/ResourceIterator.php +++ b/src/Kdyby/Facebook/Resource/ResourceIterator.php @@ -12,7 +12,7 @@ use Iterator; use IteratorIterator; -use Nette\Object; +use Nette\SmartObject; use Nette\Utils\ArrayHash; @@ -20,9 +20,11 @@ /** * @author Martin Štekl */ -class ResourceIterator extends Object implements Iterator +class ResourceIterator implements Iterator { + use SmartObject; + /** * @var \Kdyby\Facebook\Resource\IResourceLoader */ diff --git a/src/Kdyby/Facebook/Resource/ResourceLoader.php b/src/Kdyby/Facebook/Resource/ResourceLoader.php index 928acf33..2d74f6bd 100644 --- a/src/Kdyby/Facebook/Resource/ResourceLoader.php +++ b/src/Kdyby/Facebook/Resource/ResourceLoader.php @@ -12,7 +12,7 @@ use IteratorAggregate; use Kdyby\Facebook\Facebook; -use Nette\Object; +use Nette\SmartObject; use Nette\Utils\ArrayHash; use Traversable; @@ -21,9 +21,11 @@ /** * @author Martin Štekl */ -class ResourceLoader extends Object implements IteratorAggregate, IResourceLoader +class ResourceLoader implements IteratorAggregate, IResourceLoader { + use SmartObject; + /** * @var \Kdyby\Facebook\Facebook */ diff --git a/src/Kdyby/Facebook/SessionStorage.php b/src/Kdyby/Facebook/SessionStorage.php index bd1033cc..6e7643ad 100644 --- a/src/Kdyby/Facebook/SessionStorage.php +++ b/src/Kdyby/Facebook/SessionStorage.php @@ -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 diff --git a/src/Kdyby/Facebook/SignedRequest.php b/src/Kdyby/Facebook/SignedRequest.php index 549f227c..4f703bc1 100644 --- a/src/Kdyby/Facebook/SignedRequest.php +++ b/src/Kdyby/Facebook/SignedRequest.php @@ -20,9 +20,11 @@ /** * @author Filip Procházka */ -class SignedRequest extends Nette\Object +class SignedRequest { + use Nette\SmartObject; + /** * Parses a signed_request and validates the signature. *