From f476d8665a6b49755796a49f86179fe8f97b09e4 Mon Sep 17 00:00:00 2001 From: daniele d'angeli Date: Mon, 15 Sep 2014 13:17:41 +0100 Subject: [PATCH] added description interface to extend it description interface fixed op stashed parameters Update DescriptionInterface.php changed attribute to private --- src/Description.php | 2 +- src/DescriptionInterface.php | 109 ++++++++++++++++++++++++++++++++++ src/GuzzleClient.php | 12 ++-- src/GuzzleClientInterface.php | 2 +- src/Operation.php | 6 +- src/Parameter.php | 2 +- 6 files changed, 121 insertions(+), 12 deletions(-) create mode 100644 src/DescriptionInterface.php diff --git a/src/Description.php b/src/Description.php index 56d4507e..75ee68e6 100644 --- a/src/Description.php +++ b/src/Description.php @@ -7,7 +7,7 @@ /** * Represents a Guzzle service description */ -class Description +class Description implements DescriptionInterface { /** @var array Array of {@see OperationInterface} objects */ private $operations = []; diff --git a/src/DescriptionInterface.php b/src/DescriptionInterface.php new file mode 100644 index 00000000..3f776193 --- /dev/null +++ b/src/DescriptionInterface.php @@ -0,0 +1,109 @@ + '', diff --git a/src/Parameter.php b/src/Parameter.php index 2b7a972a..959598dd 100644 --- a/src/Parameter.php +++ b/src/Parameter.php @@ -137,7 +137,7 @@ public function __construct(array $data = [], array $options = []) if (isset($options['description'])) { $this->serviceDescription = $options['description']; - if (!($this->serviceDescription instanceof Description)) { + if (!($this->serviceDescription instanceof DescriptionInterface)) { throw new \InvalidArgumentException('description must be a Description'); } if (isset($data['$ref'])) {