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

phpdoc errors reported by Doctum #491

Open
williamdes opened this issue May 27, 2021 · 5 comments
Open

phpdoc errors reported by Doctum #491

williamdes opened this issue May 27, 2021 · 5 comments

Comments

@williamdes
Copy link
Contributor

williamdes commented May 27, 2021

ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiCardPreAuthorizations::Create" in MangoPay/ApiCardPreAuthorizations.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiCardRegistrations::Create" in MangoPay/ApiCardRegistrations.php:15
ERROR: The "filter" parameter of the method "GetPreAuthorizations" is missing a @param tag on "MangoPay\ApiCards::GetPreAuthorizations" in MangoPay/ApiCards.php:52
ERROR: The "idempotencyKey" parameter of the method "UploadLogo" is missing a @param tag on "MangoPay\ApiClients::UploadLogo" in MangoPay/ApiClients.php:42
ERROR: The "logoUpload" parameter of the method "UploadLogo" is missing a @param tag on "MangoPay\ApiClients::UploadLogo" in MangoPay/ApiClients.php:42
ERROR: The "idempotencyKey" parameter of the method "UploadLogoFromFile" is missing a @param tag on "MangoPay\ApiClients::UploadLogoFromFile" in MangoPay/ApiClients.php:60
ERROR: The "dispute" parameter of the method "Update" is missing a @param tag on "MangoPay\ApiDisputes::Update" in MangoPay/ApiDisputes.php:53
ERROR: The "idempotencyKey" parameter of the method "CreateSettlementTransfer" is missing a @param tag on "MangoPay\ApiDisputes::CreateSettlementTransfer" in MangoPay/ApiDisputes.php:154
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocument" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocument" in MangoPay/ApiDisputes.php:200
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocumentPage" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocumentPage" in MangoPay/ApiDisputes.php:211
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocumentPageFromFile" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocumentPageFromFile" in MangoPay/ApiDisputes.php:229
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiMandates::Create" in MangoPay/ApiMandates.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiPayIns::Create" in MangoPay/ApiPayIns.php:15
ERROR: The "idempotencyKey" parameter of the method "CreateRefund" is missing a @param tag on "MangoPay\ApiPayIns::CreateRefund" in MangoPay/ApiPayIns.php:38
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiPayOuts::Create" in MangoPay/ApiPayOuts.php:15
ERROR: The "filter" parameter of the method "GetRefunds" is missing a @param tag on "MangoPay\ApiPayOuts::GetRefunds" in MangoPay/ApiPayOuts.php:50
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiReports::Create" in MangoPay/ApiReports.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiTransfers::Create" in MangoPay/ApiTransfers.php:15
ERROR: The "idempotencyKey" parameter of the method "CreateRefund" is missing a @param tag on "MangoPay\ApiTransfers::CreateRefund" in MangoPay/ApiTransfers.php:36
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiUsers::Create" in MangoPay/ApiUsers.php:16
ERROR: The "idempotencyKey" parameter of the method "CreateBankAccount" is missing a @param tag on "MangoPay\ApiUsers::CreateBankAccount" in MangoPay/ApiUsers.php:125
ERROR: The "idempotencyKey" parameter of the method "CreateKycPage" is missing a @param tag on "MangoPay\ApiUsers::CreateKycPage" in MangoPay/ApiUsers.php:294
ERROR: The "idempotencyKey" parameter of the method "CreateKycPageFromFile" is missing a @param tag on "MangoPay\ApiUsers::CreateKycPageFromFile" in MangoPay/ApiUsers.php:315
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiWallets::Create" in MangoPay/ApiWallets.php:15
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\ApiBase::__construct" in MangoPay/Libraries/ApiBase.php:205
ERROR: The "idempotencyKey" parameter of the method "CreateObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::CreateObject" in MangoPay/Libraries/ApiBase.php:238
ERROR: The "subEntityId" parameter of the method "CreateObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::CreateObject" in MangoPay/Libraries/ApiBase.php:238
ERROR: The "firstEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:274
ERROR: The "secondEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:274
ERROR: The "thirdEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:274
ERROR: The "secondEntityId" parameter of the method "GetList" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetList" in MangoPay/Libraries/ApiBase.php:304
ERROR: The "secondEntityId" parameter of the method "SaveObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::SaveObject" in MangoPay/Libraries/ApiBase.php:341
ERROR: The "thirdEntityId" parameter of the method "SaveObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::SaveObject" in MangoPay/Libraries/ApiBase.php:341
ERROR: The "asDependentObject" parameter of the method "CastResponseToEntity" is missing a @param tag on "MangoPay\Libraries\ApiBase::CastResponseToEntity" in MangoPay/Libraries/ApiBase.php:374
ERROR: The hint on "CastResponseToEntity" at @return is invalid: "\MangoPay\$entityClassName Return entity object" on "MangoPay\Libraries\ApiBase::CastResponseToEntity" in MangoPay/Libraries/ApiBase.php:374
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\AuthenticationHelper::__construct" in MangoPay/Libraries/AuthenticationHelper.php:17
ERROR: The "requestUrl" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\ResponseException::__construct" in MangoPay/Libraries/ResponseException.php:46
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\UrlTool::__construct" in MangoPay/Libraries/UrlTool.php:17

@williamdes
Copy link
Contributor Author

williamdes commented May 27, 2021

@MockingMagician
Copy link
Contributor

@williamdes very well spoted

More deeply we'll should run phpstan : It returns Found 514 errors on --level max

If I've foud some extra times maybe I will deal with that. Just a teaser about:


Line Address.php


46 Method MangoPay\Address::CanBeNull() has no return typehint specified.
56 Method MangoPay\Address::IsEmpty() has no return typehint specified.
56 Method MangoPay\Address::IsEmpty() has parameter $value with no typehint specified.



Line ApiBankAccounts.php


18 Method MangoPay\ApiBankAccounts::GetTransactions() has no return typehint specified.
20 Parameter #3 $responseClassName of method MangoPay\Libraries\ApiBase::GetList() expects
object|null, string given.



Line ApiBankingAliases.php


17 Parameter #2 $responseClassName of method MangoPay\Libraries\ApiBase::GetObject() expects object,
null given.
75 Method MangoPay\ApiBankingAliases::GetBankingAliasResponse() should return MangoPay\BankingAlias
but returns MangoPay.



Line ApiCardPreAuthorizations.php


15 Method MangoPay\ApiCardPreAuthorizations::Create() has parameter $idempotencyKey with no typehint
specified.
17 Method MangoPay\ApiCardPreAuthorizations::Create() should return MangoPay\CardPreAuthorization but
returns object.
17 Parameter #3 $responseClassName of method MangoPay\Libraries\ApiBase::CreateObject() expects
object|null, string given.
27 Method MangoPay\ApiCardPreAuthorizations::Get() should return MangoPay\CardPreAuthorization but
returns object.
27 Parameter #2 $responseClassName of method MangoPay\Libraries\ApiBase::GetObject() expects object,
string given.
37 Method MangoPay\ApiCardPreAuthorizations::Update() should return MangoPay\CardPreAuthorization but
returns object.
37 Parameter #3 $responseClassName of method MangoPay\Libraries\ApiBase::SaveObject() expects
object|null, string given.
40 Method MangoPay\ApiCardPreAuthorizations::GetTransactions() has no return typehint specified.
40 Method MangoPay\ApiCardPreAuthorizations::GetTransactions() has parameter $cardPreAuthorizationId
with no typehint specified.
40 Method MangoPay\ApiCardPreAuthorizations::GetTransactions() has parameter $filter with no typehint
specified.
40 Method MangoPay\ApiCardPreAuthorizations::GetTransactions() has parameter $pagination with no
typehint specified.
40 Method MangoPay\ApiCardPreAuthorizations::GetTransactions() has parameter $sorting with no typehint
specified.
42 Parameter #3 $responseClassName of method MangoPay\Libraries\ApiBase::GetList() expects
object|null, string given.


@williamdes
Copy link
Contributor Author

Update: https://github.com/code-lts/doctum/runs/3454667074?check_suite_focus=true#step:4:3933

ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiCardPreAuthorizations::Create" in MangoPay/ApiCardPreAuthorizations.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiCardRegistrations::Create" in MangoPay/ApiCardRegistrations.php:15
ERROR: The "filter" parameter of the method "GetPreAuthorizations" is missing a @param tag on "MangoPay\ApiCards::GetPreAuthorizations" in MangoPay/ApiCards.php:52
ERROR: The "idempotencyKey" parameter of the method "UploadLogo" is missing a @param tag on "MangoPay\ApiClients::UploadLogo" in MangoPay/ApiClients.php:42
ERROR: The "logoUpload" parameter of the method "UploadLogo" is missing a @param tag on "MangoPay\ApiClients::UploadLogo" in MangoPay/ApiClients.php:42
ERROR: The "idempotencyKey" parameter of the method "UploadLogoFromFile" is missing a @param tag on "MangoPay\ApiClients::UploadLogoFromFile" in MangoPay/ApiClients.php:60
ERROR: The "dispute" parameter of the method "Update" is missing a @param tag on "MangoPay\ApiDisputes::Update" in MangoPay/ApiDisputes.php:53
ERROR: The "idempotencyKey" parameter of the method "CreateSettlementTransfer" is missing a @param tag on "MangoPay\ApiDisputes::CreateSettlementTransfer" in MangoPay/ApiDisputes.php:154
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocument" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocument" in MangoPay/ApiDisputes.php:200
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocumentPage" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocumentPage" in MangoPay/ApiDisputes.php:211
ERROR: The "idempotencyKey" parameter of the method "CreateDisputeDocumentPageFromFile" is missing a @param tag on "MangoPay\ApiDisputes::CreateDisputeDocumentPageFromFile" in MangoPay/ApiDisputes.php:229
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiMandates::Create" in MangoPay/ApiMandates.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiPayIns::Create" in MangoPay/ApiPayIns.php:15
ERROR: The "idempotencyKey" parameter of the method "CreateRefund" is missing a @param tag on "MangoPay\ApiPayIns::CreateRefund" in MangoPay/ApiPayIns.php:38
ERROR: The "idempotencyKey" parameter of the method "CreateRecurringRegistration" is missing a @param tag on "MangoPay\ApiPayIns::CreateRecurringRegistration" in MangoPay/ApiPayIns.php:48
ERROR: The "idempotencyKey" parameter of the method "GetRecurringRegistration" is missing a @param tag on "MangoPay\ApiPayIns::GetRecurringRegistration" in MangoPay/ApiPayIns.php:58
ERROR: The "idempotencyKey" parameter of the method "UpdateRecurringRegistration" is missing a @param tag on "MangoPay\ApiPayIns::UpdateRecurringRegistration" in MangoPay/ApiPayIns.php:68
ERROR: The "idempotencyKey" parameter of the method "CreateRecurringPayInRegistrationCIT" is missing a @param tag on "MangoPay\ApiPayIns::CreateRecurringPayInRegistrationCIT" in MangoPay/ApiPayIns.php:78
ERROR: The "idempotencyKey" parameter of the method "CreateRecurringPayInRegistrationMIT" is missing a @param tag on "MangoPay\ApiPayIns::CreateRecurringPayInRegistrationMIT" in MangoPay/ApiPayIns.php:87
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiPayOuts::Create" in MangoPay/ApiPayOuts.php:15
ERROR: The "filter" parameter of the method "GetRefunds" is missing a @param tag on "MangoPay\ApiPayOuts::GetRefunds" in MangoPay/ApiPayOuts.php:50
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiReports::Create" in MangoPay/ApiReports.php:15
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiTransfers::Create" in MangoPay/ApiTransfers.php:15
ERROR: The "idempotencyKey" parameter of the method "CreateRefund" is missing a @param tag on "MangoPay\ApiTransfers::CreateRefund" in MangoPay/ApiTransfers.php:36
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiUsers::Create" in MangoPay/ApiUsers.php:16
ERROR: The "idempotencyKey" parameter of the method "CreateBankAccount" is missing a @param tag on "MangoPay\ApiUsers::CreateBankAccount" in MangoPay/ApiUsers.php:125
ERROR: The "idempotencyKey" parameter of the method "CreateKycPage" is missing a @param tag on "MangoPay\ApiUsers::CreateKycPage" in MangoPay/ApiUsers.php:294
ERROR: The "idempotencyKey" parameter of the method "CreateKycPageFromFile" is missing a @param tag on "MangoPay\ApiUsers::CreateKycPageFromFile" in MangoPay/ApiUsers.php:315
ERROR: The "idempotencyKey" parameter of the method "Create" is missing a @param tag on "MangoPay\ApiWallets::Create" in MangoPay/ApiWallets.php:15
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\ApiBase::__construct" in MangoPay/Libraries/ApiBase.php:210
ERROR: The "idempotencyKey" parameter of the method "CreateObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::CreateObject" in MangoPay/Libraries/ApiBase.php:243
ERROR: The "subEntityId" parameter of the method "CreateObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::CreateObject" in MangoPay/Libraries/ApiBase.php:243
ERROR: The "firstEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:279
ERROR: The "secondEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:279
ERROR: The "thirdEntityId" parameter of the method "GetObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetObject" in MangoPay/Libraries/ApiBase.php:279
ERROR: The "secondEntityId" parameter of the method "GetList" is missing a @param tag on "MangoPay\Libraries\ApiBase::GetList" in MangoPay/Libraries/ApiBase.php:309
ERROR: The "secondEntityId" parameter of the method "SaveObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::SaveObject" in MangoPay/Libraries/ApiBase.php:346
ERROR: The "thirdEntityId" parameter of the method "SaveObject" is missing a @param tag on "MangoPay\Libraries\ApiBase::SaveObject" in MangoPay/Libraries/ApiBase.php:346
ERROR: The "asDependentObject" parameter of the method "CastResponseToEntity" is missing a @param tag on "MangoPay\Libraries\ApiBase::CastResponseToEntity" in MangoPay/Libraries/ApiBase.php:379
ERROR: The hint on "CastResponseToEntity" at @return is invalid: "\MangoPay\$entityClassName Return entity object" on "MangoPay\Libraries\ApiBase::CastResponseToEntity" in MangoPay/Libraries/ApiBase.php:379
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\AuthenticationHelper::__construct" in MangoPay/Libraries/AuthenticationHelper.php:17
ERROR: The "requestUrl" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\ResponseException::__construct" in MangoPay/Libraries/ResponseException.php:46
ERROR: The "root" parameter of the method "__construct" is missing a @param tag on "MangoPay\Libraries\UrlTool::__construct" in MangoPay/Libraries/UrlTool.php:17

this one is the most problematic, all other ones are missing docs

ERROR: The hint on "CastResponseToEntity" at @return is invalid: "\MangoPay\$entityClassName Return entity object" on "MangoPay\Libraries\ApiBase::CastResponseToEntity" in MangoPay/Libraries/ApiBase.php:379

@williamdes
Copy link
Contributor Author

They should use Emoney and not object
https://github.com/Mangopay/mangopay2-php-sdk/blob/master/MangoPay/EMoney.php

@williamdes
Copy link
Contributor Author

typo:

* @return \MangoPay\EMoney EMoney obhect returned from API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants