Skip to content

Commit

Permalink
Merge pull request #1 from Mane-Olawale/development
Browse files Browse the repository at this point in the history
[ADDITION: Token Entity] Added token entity to the package
  • Loading branch information
Mane-Olawale authored Jun 11, 2021
2 parents 2080ff8 + 1ff150d commit 59d166b
Show file tree
Hide file tree
Showing 10 changed files with 627 additions and 148 deletions.
15 changes: 15 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
* text=auto

*.css diff=css
*.html diff=html
*.md diff=markdown
*.php diff=php

/.github export-ignore
/tests export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.styleci.yml export-ignore
CHANGELOG.md export-ignore
phpunit.xml.dist export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor
composer.lock
/phpunit.xml
.phpunit.result.cache
18 changes: 16 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,28 @@
}
],
"require": {
"php": ">=7.1",
"mane-olawale/termii": "^1.0"
"php": ">=7.2",
"mane-olawale/termii": "^1.0",
"illuminate/notifications": "^6.0|^7.0|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0"
},
"require-dev": {
"phpunit/phpunit": "~8.0|~9.0",
"mockery/mockery": "~1.4"
},
"autoload": {
"psr-4": {
"ManeOlawale\\Laravel\\Termii\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ManeOlawale\\Laravel\\Termii\\Tests\\": "tests/"
}
},
"scripts": {
"tests": "./vendor/bin/phpunit --verbose"
},
"extra": {
"laravel": {
"providers": [
Expand Down
20 changes: 20 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
beStrictAboutTestsThatDoNotTestAnything="true"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
verbose="true"
>
<testsuites>
<testsuite name="Termii Package Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
</phpunit>
18 changes: 3 additions & 15 deletions src/Channels/TermiiSmsChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use ManeOlawale\Laravel\Termii\Messages\TermiiMessage;
use Illuminate\Notifications\Notification;
use ManeOlawale\Laravel\Termii\Termii;
use ManeOlawale\Termii\Client;

class TermiiSmsChannel
{
Expand Down Expand Up @@ -53,7 +54,7 @@ public function send($notifiable, Notification $notification)
if (is_string($message)) {
$message = new TermiiMessage($message);
}

if ($message->client){
$client = $this->termii->client();
$this->termii->usingClient($message->client);
Expand All @@ -66,20 +67,7 @@ public function send($notifiable, Notification $notification)
}

return $result;

/*
$payload = [
'type' => $message->type,
'from' => $message->from ?: $this->from,
'to' => $to,
'text' => trim($message->content),
'client-ref' => $message->clientReference,
];
if ($message->statusCallback) {
$payload['callback'] = $message->statusCallback;
}

return ($message->client ?? $this->termii)->sms->send($to, $message); */
}

}
Loading

0 comments on commit 59d166b

Please sign in to comment.