Skip to content

Commit

Permalink
efabrica/phpstan-latte compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMystikJonas committed Feb 22, 2023
1 parent 467810e commit 4352bb1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/MetisFW/Stripe/UI/PaymentControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ public function handleSuccess() {
*/
public function render($attrs = array(), $text = "Submit payment") {
$template = $this->template;
$templateFilePath = $this->getTemplateFilePath();
$template->setFile($templateFilePath);
if($this->templateFilePath) {
/** @phpstan-latte-ignore */
$template->setFile($this->templateFilePath);
} else {
$template->setFile($this->getDefaultTemplateFilePath());
}
try {
$template->clientSecret = $this->operation->createPaymentIntent()->client_secret;
$template->publicApiKey = $this->operation->getPublicApiKey();
Expand Down

0 comments on commit 4352bb1

Please sign in to comment.