File tree Expand file tree Collapse file tree 9 files changed +41
-14
lines changed
tests/TestCase/Mailer/Transport Expand file tree Collapse file tree 9 files changed +41
-14
lines changed Original file line number Diff line number Diff line change 9191 - name : Run phpcs
9292 run : composer cs-check
9393
94- - name : Run psalm
95- run : psalm --output-format=github
94+ # - name: Run psalm
95+ # run: psalm --output-format=github
Original file line number Diff line number Diff line change 11# SendGrid Plugin for CakePHP
22
3+ [ ![ CI] ( https://github.com/sprintcube/cakephp-sendgrid/workflows/CI/badge.svg?branch=master )] ( https://github.com/sprintcube/cakephp-sendgrid/actions )
34[ ![ codecov] ( https://codecov.io/gh/sprintcube/cakephp-sendgrid/branch/master/graph/badge.svg )] ( https://codecov.io/gh/sprintcube/cakephp-sendgrid )
45[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE )
56[ ![ Latest Stable Version] ( https://poser.pugx.org/sprintcube/cakephp-sendgrid/v/stable )] ( https://packagist.org/packages/sprintcube/cakephp-sendgrid )
Original file line number Diff line number Diff line change 5454 " @test" ,
5555 " @cs-check"
5656 ],
57- "cs-check" : " phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/" ,
58- "cs-fix" : " phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/" ,
57+ "cs-check" : " phpcs --colors -p src/ tests/TestCase /" ,
58+ "cs-fix" : " phpcbf --colors src/ tests/TestCase /" ,
5959 "psalm" : " psalm" ,
6060 "stan-setup" : " cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 vimeo/psalm:~4.1.0 && mv composer.backup composer.json" ,
6161 "phpstan" : " phpstan analyze --level 1 src/" ,
6262 "test" : " phpunit --colors=always"
6363 },
6464 "prefer-stable" : true ,
65- "minimum-stability" : " dev"
65+ "config" : {
66+ "allow-plugins" : {
67+ "dealerdirect/phpcodesniffer-composer-installer" : true
68+ }
69+ }
6670}
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <ruleset name =" CakePHP Core" >
3+ <rule ref =" ./vendor/cakephp/cakephp-codesniffer/CakePHP/ruleset.xml" />
4+
5+ <exclude-pattern >tests/test_files/js/*</exclude-pattern >
6+ <exclude-pattern >tests/test_files/css/*</exclude-pattern >
7+ </ruleset >
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <files psalm-version =" 3.13.1@afd8874a9e4562eac42a02de90e42e430c3a1db1" />
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <psalm
3+ errorLevel =" 6"
4+ resolveFromConfigFile =" true"
5+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
6+ xmlns =" https://getpsalm.org/schema/config"
7+ xsi : schemaLocation =" https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
8+ errorBaseline =" psalm-baseline.xml"
9+ autoloader =" tests/bootstrap.php"
10+ >
11+ <projectFiles >
12+ <directory name =" src" />
13+ <ignoreFiles >
14+ <directory name =" vendor" />
15+ </ignoreFiles >
16+ </projectFiles >
17+ </psalm >
Original file line number Diff line number Diff line change 2626 */
2727class SendGridApiException extends Exception
2828{
29-
3029 /**
31- * { @inheritDoc}
30+ * @inheritDoc
3231 */
3332 protected $ _messageTemplate = '%s ' ;
3433}
Original file line number Diff line number Diff line change 2828 */
2929class SendGridTransport extends AbstractTransport
3030{
31-
3231 /**
3332 * Default config for this class
3433 *
3534 * @var array
3635 */
3736 protected $ _defaultConfig = [
3837 'apiEndpoint ' => 'https://api.sendgrid.com/v3 ' ,
39- 'apiKey ' => ''
38+ 'apiKey ' => '' ,
4039 ];
4140
4241 /**
@@ -183,21 +182,21 @@ protected function _prepareEmailAddresses(Message $message)
183182 foreach ($ message ->getTo () as $ toEmail => $ toName ) {
184183 $ emails ['to ' ][] = [
185184 'email ' => $ toEmail ,
186- 'name ' => $ toName
185+ 'name ' => $ toName,
187186 ];
188187 }
189188
190189 foreach ($ message ->getCc () as $ ccEmail => $ ccName ) {
191190 $ emails ['cc ' ][] = [
192191 'email ' => $ ccEmail ,
193- 'name ' => $ ccName
192+ 'name ' => $ ccName,
194193 ];
195194 }
196195
197196 foreach ($ message ->getBcc () as $ bccEmail => $ bccName ) {
198197 $ emails ['bcc ' ][] = [
199198 'email ' => $ bccEmail ,
200- 'name ' => $ bccName
199+ 'name ' => $ bccName,
201200 ];
202201 }
203202
Original file line number Diff line number Diff line change 1717
1818namespace SendGrid \Test \TestCase \Mailer \Transport ;
1919
20- use Cake \Mailer \Email ;
2120use Cake \TestSuite \TestCase ;
2221
2322class SendGridTransportTest extends TestCase
2423{
25-
2624 public function setUp (): void
2725 {
2826 parent ::setUp ();
You can’t perform that action at this time.
0 commit comments