Skip to content

Commit

Permalink
Merge pull request #5 from MyOutDeskLLC/feature/refactoring-standard-…
Browse files Browse the repository at this point in the history
…object-api

fix: allowing some methods to return null (response empty) accepted - JL
  • Loading branch information
WalrusSoup authored Mar 9, 2022
2 parents f9d06dc + ea77a43 commit bf87306
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/Api/ReportApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ public function createReport(array $reportMetadata): array
*
* @param string $reportId salesforce id of the report
*
* @return array
* @return array|null
*/
public function deleteReport(string $reportId): array
public function deleteReport(string $reportId): ?array
{
$request = new DeleteReport($reportId);

Expand All @@ -109,9 +109,9 @@ public function deleteReport(string $reportId): array
*
* @param string $dashboardId salesforce id of the dashboard
*
* @return array
* @return array|null
*/
public function deleteDashboard(string $dashboardId): array
public function deleteDashboard(string $dashboardId): ?array
{
$request = new DeleteDashboard($dashboardId);

Expand Down Expand Up @@ -681,11 +681,11 @@ public function createDashboardFolder(string $folderName): array
*
* @param string $folderId salesforce id of the folder
*
* @return array
* @return array|null
*
* @link https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/analytics_api_folders_create.htm
*/
public function deleteFolder(string $folderId): array
public function deleteFolder(string $folderId): ?array
{
$request = new DeleteFolder($folderId);

Expand Down
4 changes: 2 additions & 2 deletions src/SalesforceApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ public function getLimits()
*
* @throws GuzzleException|SaloonException|\ReflectionException
*
* @return array
* @return array|null
*/
protected function executeRequest(SaloonRequest $request): array
protected function executeRequest(SaloonRequest $request): ?array
{
$response = $request->send()->json();

Expand Down

0 comments on commit bf87306

Please sign in to comment.