From: Michael Wallner Date: Mon, 16 Jan 2017 08:35:24 +0000 (+0100) Subject: finalize classes X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fseekat;a=commitdiff_plain;h=626d8937c75f6d8fca463fa2b374f645068b2d6d finalize classes --- diff --git a/lib/API/Call.php b/lib/API/Call.php index d84a24c..f10d6e8 100644 --- a/lib/API/Call.php +++ b/lib/API/Call.php @@ -7,7 +7,7 @@ use React\Promise\ExtendedPromiseInterface; use seekat\API; use seekat\Exception; -class Call +final class Call { /** * @var API @@ -29,7 +29,7 @@ class Call /* fetch resource, unless already localized, and try for {$method}_url */ if (!$this->api->exists($this->call)) { - $promise = $promise->otherwise(function ($error) use($args) { + $promise = $promise->otherwise(function($error) use($args) { if ($this->api->exists($this->call."_url", $url)) { $url = new Url(uri_template($url, (array)current($args))); return $this->api->withUrl($url)->get(...$args); diff --git a/lib/API/Call/Cache.php b/lib/API/Call/Cache.php index b802172..b6d062c 100644 --- a/lib/API/Call/Cache.php +++ b/lib/API/Call/Cache.php @@ -9,7 +9,7 @@ use seekat\API\Call\Cache\Service; use seekat\API\Call\Cache\Service\Hollow; -class Cache +final class Cache { /** * @var Service diff --git a/lib/API/Call/Deferred.php b/lib/API/Call/Deferred.php index a01891f..7fc44de 100644 --- a/lib/API/Call/Deferred.php +++ b/lib/API/Call/Deferred.php @@ -6,12 +6,11 @@ use Exception; use http\{ Client, Client\Request, Client\Response }; -use React\Promise\ExtendedPromiseInterface; use seekat\API; use SplObserver; use SplSubject; -class Deferred extends \React\Promise\Deferred implements SplObserver +final class Deferred extends \React\Promise\Deferred implements SplObserver { /** * The response importer diff --git a/lib/API/Consumer.php b/lib/API/Consumer.php index 5e72ef2..6e677fe 100644 --- a/lib/API/Consumer.php +++ b/lib/API/Consumer.php @@ -11,7 +11,7 @@ use React\Promise\{ function all }; -class Consumer extends Deferred +final class Consumer extends Deferred { /** * The HTTP client diff --git a/lib/API/ContentType.php b/lib/API/ContentType.php index 4fccb9f..3ce123d 100644 --- a/lib/API/ContentType.php +++ b/lib/API/ContentType.php @@ -9,7 +9,7 @@ use http\{ Header, Message\Body }; -class ContentType +final class ContentType { /** * API version diff --git a/lib/API/Iterator.php b/lib/API/Iterator.php index b218747..33d5132 100644 --- a/lib/API/Iterator.php +++ b/lib/API/Iterator.php @@ -6,7 +6,7 @@ use http\Url; use Iterator as BaseIterator; use seekat\API; -class Iterator implements BaseIterator +final class Iterator implements BaseIterator { /** * The endpoint diff --git a/lib/API/Links.php b/lib/API/Links.php index 7022cda..85d24bd 100644 --- a/lib/API/Links.php +++ b/lib/API/Links.php @@ -11,7 +11,7 @@ use http\ { }; use Serializable; -class Links implements Serializable +final class Links implements Serializable { /** * Parsed "Link" relations