Skip to content
This repository has been archived by the owner on May 30, 2019. It is now read-only.

Commit

Permalink
Fixes #571 Updated PHPDoc and improved format
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoreram committed Oct 5, 2015
1 parent c386585 commit e223b20
Showing 1 changed file with 33 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ class PaymentCollectEventListener
protected $formFactory;

/**
* @var
* @var EngineInterface
*
* Templating
*/
protected $templating;

Expand Down Expand Up @@ -136,21 +138,41 @@ public function addStripePaymentMethod(PaymentCollectionEvent $event)
}
}

/**
* Return stripe form
*
* @return string Stripe form
*/
protected function getStripeForm()
{
$formType = $this->formFactory->create('stripe_view');

return $this->templating->render('StripeBundle:Stripe:view.html.twig', [
'stripe_form' => $formType->createView(),
'stripe_execute_route' => StripeRoutesLoader::ROUTE_NAME,
]);
$formType = $this
->formFactory
->create('stripe_view');

return $this
->templating
->render('StripeBundle:Stripe:view.html.twig', [
'stripe_form' => $formType->createView(),
'stripe_execute_route' => StripeRoutesLoader::ROUTE_NAME,
]);
}

/**
* Return stripe script
*
* @return string Stripe script
*/
protected function getStripeScript()
{
return $this->templating->render('StripeBundle:Stripe:scripts.html.twig', [
'public_key' => $this->publicKey,
'currency' => $this->paymentBridgeInterface->getCurrency(),
]);
$currency = $this
->paymentBridgeInterface
->getCurrency();

return $this
->templating
->render('StripeBundle:Stripe:scripts.html.twig', [
'public_key' => $this->publicKey,
'currency' => $currency,
]);
}
}

0 comments on commit e223b20

Please sign in to comment.