Closed wimpog closed 7 years ago
Where are you seeing that error?
IIRC it's something that phpStorm throws up based on the tags in the comments in the abstract class but not actually a real PHP error.
I have run into this issue on PhpStorm as well. Does anyone know of a way to make it so PhpStorm doesn't give an error based on what is in the comments?
This is a question for the makers of phpStorm not for the omnipay library. I hit this error a lot but I just ignore it.
I have done some research on this and it looks like PhpStorm maybe right in the way it is treating this. I found a page(https://www.phpdoc.org/docs/latest/references/phpdoc/tags/method.html) that talks about the @method tag and it's purpose. It seems that the purpose here is to document methods that are implemented through __call instead of a standard function so when PhpStorm doesn't see the same tags in the concrete class, it throws that error. It would be nice if we could find a different way to document those methods but I have not seen one. PhpStorm does offer a couple solutions. You can "Disable Inspection" but I don't recommend this option because it disables that inspection for all of your classes, not just the current one. You can also "suppress" the inspection which adds a comment to your code but then the error will only be gone in the current class. The third option is to do as @delatbabel does and just realize that error is not an actual php error and ignore it. I haven't decided yet what I am going to do. Probably the third option.
The third option is the winner for me. I'm closing this because it's not an actual PHP bug in either omnipay or the test classes, just a feature of the way that annotations are handled by certain non-PHP code checking tools.
class AbstractGatewayTest_MockAbstractGateway extends AbstractGateway { public function getName() { return 'Mock Gateway Implementation'; }
}
Error Class must be declared abstract or implement methods 'completeAuthorize', 'deleteCard', 'completePurchase', 'authorize', 'void', 'purchase', 'capture', 'createCard', 'updateCard', 'refund'
Is this test not finished or what?