Skip to content
This repository has been archived by the owner on Mar 22, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from rennokki/analysis-q26MER
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI.
  • Loading branch information
rennokki authored Aug 5, 2018
2 parents 060ffc3 + 372c772 commit 805a364
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/LaravelMJML.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

use GuzzleHttp\Client as GuzzleClient;

class LaravelMJML {

class LaravelMJML
{
private $secretKey;
protected $appId;
public $publicKey;
Expand Down Expand Up @@ -73,13 +73,13 @@ public function renderRequest(string $mjml)
'auth' => [$this->appId, $this->secretKey],
'headers' => [
'Content-Type' => 'application/x-www-form-urlencoded',
'Accepts' => 'application/json'
'Accepts' => 'application/json',
],
\GuzzleHttp\RequestOptions::JSON => [
'mjml' => $mjml,
],
]);
} catch(\GuzzleHttp\Exception\ClientException $e) {
} catch (\GuzzleHttp\Exception\ClientException $e) {
return json_decode($e->getResponse()->getBody()->getContents());
}

Expand All @@ -95,9 +95,9 @@ public function renderRequest(string $mjml)
public function render(string $mjml)
{
$request = $this->renderRequest($mjml);
if(property_exists($request, 'status_code') && $request->status_code != 200) {
return null;

if (property_exists($request, 'status_code') && $request->status_code != 200) {
return;
}

return $request->html;
Expand All @@ -116,4 +116,4 @@ public function renderWithMustache(string $mjml, array $parameters = [])

return $this->mustache->render($html, $parameters);
}
}
}

0 comments on commit 805a364

Please sign in to comment.