Skip to content

Commit bb9505e

Browse files
Update doc
1 parent c16c570 commit bb9505e

3 files changed

Lines changed: 32 additions & 6 deletions

File tree

src/Controller/AppController.php

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
<?php
2+
23
declare(strict_types=1);
34

5+
/**
6+
* SendGrid Plugin for CakePHP
7+
* Copyright (c) SprintCube (https://www.sprintcube.com)
8+
*
9+
* Licensed under The MIT License
10+
* For full copyright and license information, please see the LICENSE.md
11+
* Redistributions of files must retain the above copyright notice.
12+
*
13+
* @copyright Copyright (c) SprintCube (https://www.sprintcube.com)
14+
* @license https://opensource.org/licenses/mit-license.php MIT License
15+
* @link https://github.com/sprintcube/cakephp-sendgrid
16+
* @since 5.0.0
17+
*/
18+
419
namespace SendGrid\Controller;
520

621
use App\Controller\AppController as BaseController;
722

8-
class AppController extends BaseController
9-
{
10-
}
23+
class AppController extends BaseController {}

src/Controller/WebhooksController.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
*
2020
*/
2121

22+
/**
23+
* SendGrid Plugin for CakePHP
24+
* Copyright (c) SprintCube (https://www.sprintcube.com)
25+
*
26+
* Licensed under The MIT License
27+
* For full copyright and license information, please see the LICENSE.md
28+
* Redistributions of files must retain the above copyright notice.
29+
*
30+
* @copyright Copyright (c) SprintCube (https://www.sprintcube.com)
31+
* @license https://opensource.org/licenses/mit-license.php MIT License
32+
* @link https://github.com/sprintcube/cakephp-sendgrid
33+
* @since 5.0.0
34+
*/
2235

2336
namespace SendGrid\Controller;
2437

@@ -75,7 +88,7 @@ public function index()
7588
if (isset($config['secure']) && $config['secure'] == 'true') {
7689
$this->request->getBody()->rewind();
7790
$payload = $this->request->getBody()->getContents();
78-
// Log::debug($payload);
91+
// Log::debug($payload);
7992

8093
if (!isset($config['verification_key'])) {
8194
if (isset($config['debug']) && $config['debug'] == 'true') {
@@ -85,7 +98,7 @@ public function index()
8598
$this->viewBuilder()->setOption('serialize', "error");
8699
return;
87100
}
88-
101+
89102
$publicKey = PublicKey::fromString($config['verification_key']);
90103

91104
$timestampedPayload = $this->request->getHeaderLine($this::TIMESTAMP) . $payload;
@@ -126,5 +139,4 @@ public function index()
126139
$this->set('OK', "OK");
127140
$this->viewBuilder()->setOption('serialize', "OK");
128141
}
129-
130142
}

src/Mailer/SendGridMailer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
/**

0 commit comments

Comments
 (0)