Skip to content

Commit

Permalink
rename classes
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Aug 12, 2016
1 parent 1ecb69e commit 1e29541
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ You must install the service provider:
// config/app.php
'providers' => [
...
NotificationChannels\OneSignal\Provider::class,
NotificationChannels\OneSignal\OneSignalProvider::class,
];
```

Expand Down Expand Up @@ -68,12 +68,12 @@ class AccountApproved extends Notification
{
public function via($notifiable)
{
return [Channel::class];
return [OneSignalChannel::class];
}

public function toOneSignal($notifiable)
{
return (new Message())
return OneSignalMessage::create()
->subject("Your {$notifiable->service} account was approved!")
->body("Click here to see details.")
->url('http://onesignal.com')
Expand Down
2 changes: 1 addition & 1 deletion src/Channel.php → src/OneSignalChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Illuminate\Notifications\Notification;
use Psr\Http\Message\ResponseInterface;

class Channel
class OneSignalChannel
{
/** @var OneSignalClient */
protected $oneSignal;
Expand Down
2 changes: 1 addition & 1 deletion src/Message.php → src/OneSignalMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Illuminate\Support\Arr;

class Message
class OneSignalMessage
{
/** @var string */
protected $body;
Expand Down
4 changes: 2 additions & 2 deletions src/Provider.php → src/OneSignalServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
use Illuminate\Support\ServiceProvider;
use NotificationChannels\OneSignal\Exceptions\InvalidConfiguration;

class Provider extends ServiceProvider
class OneSignalServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*/
public function boot()
{
$this->app->when(Channel::class)
$this->app->when(OneSignalChannel::class)
->needs(OneSignalClient::class)
->give(function () {
$oneSignalConfig = config('services.onesignal');
Expand Down

0 comments on commit 1e29541

Please sign in to comment.