Skip to content
Merged
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
62 changes: 30 additions & 32 deletions src/Supporting/CommunicationProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
* @return array|null
* @ignore
*/
private function getSupportingProviders(): null|array

Check failure on line 536 in src/Supporting/CommunicationProvider.php

View workflow job for this annotation

GitHub Actions / Run PHPStan (4)

Method INTERMediator\FileMakerServer\RESTAPI\Supporting\CommunicationProvider::getSupportingProviders() is unused.
{
try {
$this->callRestAPI([], true, 'GET', [], [],
Expand All @@ -553,7 +553,7 @@
* @return string|array|null
* @ignore
*/
private function getOAuthIdentifier($provider): string|array|null

Check failure on line 556 in src/Supporting/CommunicationProvider.php

View workflow job for this annotation

GitHub Actions / Run PHPStan (4)

Method INTERMediator\FileMakerServer\RESTAPI\Supporting\CommunicationProvider::getOAuthIdentifier() never returns string so it can be removed from the return type.

Check failure on line 556 in src/Supporting/CommunicationProvider.php

View workflow job for this annotation

GitHub Actions / Run PHPStan (4)

Method INTERMediator\FileMakerServer\RESTAPI\Supporting\CommunicationProvider::getOAuthIdentifier() is unused.
{
try {
$this->callRestAPI(
Expand Down Expand Up @@ -729,38 +729,36 @@
$this->returnedCount = null;
$this->errorMessage = null;

if (property_exists($this, 'responseBody')) {
$rbody = $this->responseBody;
if (is_object($rbody)) {
if (property_exists($rbody, 'messages')) {
$result = $rbody->messages[0];
$this->httpStatus = $this->getCurlInfo("http_code");
$this->errorCode = property_exists($result, 'code') ? $result->code : -1;
$this->errorMessage = property_exists($result, 'message') && $result->code != 0 ? $result->message : null;
}
if (property_exists($rbody, 'response')) {
$result = $rbody->response;
$this->scriptError = property_exists($result, 'scriptError') ? $result->scriptError : null;
$this->scriptResult = property_exists($result, 'scriptResult') ? $result->scriptResult : null;
$this->scriptErrorPrerequest = property_exists($result, 'scriptError.prerequest') ?
$result->{'scriptError.prerequest'} : null;
$this->scriptResultPrerequest = property_exists($result, 'scriptResult.prerequest') ?
$result->{'scriptResult.prerequest'} : null;
$this->scriptErrorPresort = property_exists($result, "scriptError.presort") ?
$result->{"scriptError.presort"} : null;
$this->scriptResultPresort = property_exists($result, "scriptResult.presort") ?
$result->{"scriptResult.presort"} : null;
if (property_exists($result, 'dataInfo')) {
$dataInfo = $result->dataInfo;
$this->targetTable = property_exists($dataInfo, 'table') ?
$dataInfo->table : null;
$this->totalCount = property_exists($dataInfo, 'totalRecordCount') ?
$dataInfo->totalRecordCount : null;
$this->foundCount = property_exists($dataInfo, 'foundCount') ?
$dataInfo->foundCount : null;
$this->returnedCount = property_exists($dataInfo, 'returnedCount') ?
$dataInfo->returnedCount : null;
}
$rbody = $this->responseBody;
if (is_object($rbody)) {
if (property_exists($rbody, 'messages')) {
$result = $rbody->messages[0];
$this->httpStatus = $this->getCurlInfo("http_code");
$this->errorCode = property_exists($result, 'code') ? $result->code : -1;
$this->errorMessage = property_exists($result, 'message') && $result->code != 0 ? $result->message : null;
}
if (property_exists($rbody, 'response')) {
$result = $rbody->response;
$this->scriptError = property_exists($result, 'scriptError') ? $result->scriptError : null;
$this->scriptResult = property_exists($result, 'scriptResult') ? $result->scriptResult : null;
$this->scriptErrorPrerequest = property_exists($result, 'scriptError.prerequest') ?
$result->{'scriptError.prerequest'} : null;
$this->scriptResultPrerequest = property_exists($result, 'scriptResult.prerequest') ?
$result->{'scriptResult.prerequest'} : null;
$this->scriptErrorPresort = property_exists($result, "scriptError.presort") ?
$result->{"scriptError.presort"} : null;
$this->scriptResultPresort = property_exists($result, "scriptResult.presort") ?
$result->{"scriptResult.presort"} : null;
if (property_exists($result, 'dataInfo')) {
$dataInfo = $result->dataInfo;
$this->targetTable = property_exists($dataInfo, 'table') ?
$dataInfo->table : null;
$this->totalCount = property_exists($dataInfo, 'totalRecordCount') ?
$dataInfo->totalRecordCount : null;
$this->foundCount = property_exists($dataInfo, 'foundCount') ?
$dataInfo->foundCount : null;
$this->returnedCount = property_exists($dataInfo, 'returnedCount') ?
$dataInfo->returnedCount : null;
}
}
}
Expand Down
Loading