Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @return documentation of ODataRequest::execute() #145

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions src/ODataClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ public function query()
* @param string $requestUri
* @param array $bindings
*
* @return IODataRequest
* @return array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
*/
public function get($requestUri, $bindings = [])
{
Expand All @@ -234,7 +236,12 @@ public function get($requestUri, $bindings = [])
* @param array $bindings
* @param array $skipToken
*
* @return IODataRequest
* @return If $entityReturnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
* - Second value: string containing the "next link" URL
*/
public function getNextPage($requestUri, $bindings = [])
{
Expand Down Expand Up @@ -273,7 +280,12 @@ public function cursor($requestUri, $bindings = [])
* @param string $requestUri
* @param mixed $postData
*
* @return IODataRequest
* @return If $entityReturnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
* - Second value: string containing the "next link" URL
*/
public function post($requestUri, $postData)
{
Expand All @@ -286,7 +298,12 @@ public function post($requestUri, $postData)
* @param string $requestUri
* @param mixed $body
*
* @return IODataRequest
* @return If $entityReturnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
* - Second value: string containing the "next link" URL
*/
public function patch($requestUri, $body)
{
Expand All @@ -298,7 +315,12 @@ public function patch($requestUri, $body)
*
* @param string $requestUri
*
* @return IODataRequest
* @return If $entityReturnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
* - Second value: string containing the "next link" URL
*/
public function delete($requestUri)
{
Expand All @@ -312,7 +334,12 @@ public function delete($requestUri)
* @param string $requestUri
* @param mixed $body
*
* @return IODataRequest
* @return If $entityReturnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $entityReturnType if $entityReturnType !== false
* .. of class ODataResponse if $entityReturnType === false
* - Second value: string containing the "next link" URL
*
* @throws ODataException
*/
Expand Down
9 changes: 6 additions & 3 deletions src/ODataRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ public function setTimeout($timeout)
*
* @throws ODataException if response is invalid
*
* @return array array of objects
* of class $returnType if $returnType !== false
* of class ODataResponse if $returnType === false
* @return If $returnType === 'stream': GuzzleHttp\Psr7\Response
* Otherwise: array with two values
* - First value: array of objects
* .. of class $returnType if $returnType !== false
* .. of class ODataResponse if $returnType === false
* - Second value: string containing the "next link" URL
*/
public function execute()
{
Expand Down