Skip to content

Commit dcdf7b8

Browse files
committed
Add returntype with deletes
1 parent f03933c commit dcdf7b8

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CultureFeed/CultureFeed/DefaultOAuthClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ public function authenticatedPostAsJson(
139139
return $this->authenticatedPost($path, $params, $raw_post, $has_file_upload, 'json');
140140
}
141141

142-
public function authenticatedDelete(string $path, array $params = array(), string $format = '')
142+
public function authenticatedDelete(string $path, array $params = array(), string $format = ''): CultureFeed_HttpResponse
143143
{
144144
return $this->request($path, $params, 'DELETE', TRUE, $format);
145145
}
146146

147-
public function authenticatedDeleteAsXml(string $path, array $params = array())
147+
public function authenticatedDeleteAsXml(string $path, array $params = array()): CultureFeed_HttpResponse
148148
{
149149
return $this->authenticatedDelete($path, $params, 'xml');
150150
}
151151

152-
public function authenticatedDeleteAsJson(string $path, array $params = array())
152+
public function authenticatedDeleteAsJson(string $path, array $params = array()): CultureFeed_HttpResponse
153153
{
154154
return $this->authenticatedDelete($path, $params, 'json');
155155
}

CultureFeed/CultureFeed/EntryApi/EntryApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public function updateProduction(CultureFeed_Cdb_Item_Production $production): v
307307
*/
308308
public function deleteProduction($id): void {
309309
$result = $this->oauth_client->authenticatedDeleteAsXml('production/' . $id);
310-
$xml = $this->validateResult($result, self::CODE_ITEM_DELETED);
310+
$xml = $this->validateResult($result->response, self::CODE_ITEM_DELETED);
311311
}
312312

313313
/**

CultureFeed/CultureFeed/OAuthClient.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ public function authenticatedPostAsJson(
6262
bool $has_file_upload = false
6363
);
6464

65-
public function authenticatedDelete(string $path, array $params = array(), string $format = '');
65+
public function authenticatedDelete(string $path, array $params = array(), string $format = ''): CultureFeed_HttpResponse;
6666

67-
public function authenticatedDeleteAsXml(string $path, array $params = array());
67+
public function authenticatedDeleteAsXml(string $path, array $params = array()): CultureFeed_HttpResponse;
6868

69-
public function authenticatedDeleteAsJson(string $path, array $params = array());
69+
public function authenticatedDeleteAsJson(string $path, array $params = array()): CultureFeed_HttpResponse;
7070

7171
public function request(
7272
string $path,

0 commit comments

Comments
 (0)