From 87549c0f80b33883ca051c7fb810f49bcba13786 Mon Sep 17 00:00:00 2001 From: alanpilloud Date: Tue, 9 Apr 2019 15:50:56 +0200 Subject: [PATCH] update docs --- docs/_sidebar.md | 1 + docs/sdk/demarrage.md | 11 ++--------- docs/sdk/objectCollection.md | 3 +++ docs/sdk/recherche.md | 4 +++- src/PublimmoPro/ObjectCollection.php | 3 ++- tests/ObjectCollection.php | 17 +++++++++++++++++ 6 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 docs/sdk/objectCollection.md create mode 100644 tests/ObjectCollection.php diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 4cd6753..5b36af5 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -1,6 +1,7 @@ * SDK * [Démarrage](/sdk/demarrage.md) * [Recherche](/sdk/recherche.md) + * [Object Collection](/sdk/objectCollection.md) * [Détail d'objet](/sdk/objet.md) * API diff --git a/docs/sdk/demarrage.md b/docs/sdk/demarrage.md index 2349a97..33c2abb 100644 --- a/docs/sdk/demarrage.md +++ b/docs/sdk/demarrage.md @@ -10,15 +10,8 @@ Ajoutez ce package à votre fichier composer.json "repositories": [ ... { - "type": "package", - "package": { - "name": "publimmopro/phpsdk", - "version": "0.1.0", - "dist": { - "type": "zip", - "url": "https://github.com/alanpilloud/publimmopro-sdk-php/archive/master.zip" - } - } + "type": "vcs", + "url": "git@github.com:alanpilloud/publimmopro-sdk-php.git" } ... ], diff --git a/docs/sdk/objectCollection.md b/docs/sdk/objectCollection.md new file mode 100644 index 0000000..1b50294 --- /dev/null +++ b/docs/sdk/objectCollection.md @@ -0,0 +1,3 @@ +# Object Collection + +`PublimmoPro\ObjectCollection` est une classe représentant une liste d'objets obtenue lors d'une recherche. diff --git a/docs/sdk/recherche.md b/docs/sdk/recherche.md index 607e7af..9882a52 100644 --- a/docs/sdk/recherche.md +++ b/docs/sdk/recherche.md @@ -1,10 +1,12 @@ # Recherche ```php +use \PublimmoPro\Client; + $Client = new Client('2121313', 'unecle'); $Client->setType(Client::PARKING) - ->setDisponiblite(AVAILABILITY_IS_AVAILABLE) + ->setDisponiblite(Client::AVAILABILITY_IS_AVAILABLE) ->query(); ``` diff --git a/src/PublimmoPro/ObjectCollection.php b/src/PublimmoPro/ObjectCollection.php index 9bd2362..839d64c 100644 --- a/src/PublimmoPro/ObjectCollection.php +++ b/src/PublimmoPro/ObjectCollection.php @@ -36,7 +36,8 @@ public function get() * * @return mixed false or ObjectCollection */ - public function filter(string $filter_type, $objects_to_filter){ + public function filter(string $filter_type, $objects_to_filter) + { if (empty($objects_to_filter)){ return false; } diff --git a/tests/ObjectCollection.php b/tests/ObjectCollection.php new file mode 100644 index 0000000..0f5cbb5 --- /dev/null +++ b/tests/ObjectCollection.php @@ -0,0 +1,17 @@ +queryResults = file_get_contents('resultdata.json'); + } + + public function testConstantsAreCorrectlySet(): void + { + } +}