Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vyuldashev committed Aug 25, 2018
1 parent 1fa1915 commit e3e193b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .php_cs
Expand Up @@ -2,8 +2,10 @@

$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__.'/resources')
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
->name('*.stub')
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
Expand Down
2 changes: 1 addition & 1 deletion resources/stubs/Activator.stub
Expand Up @@ -4,8 +4,8 @@ declare(strict_types=1);

namespace DummyRootNamespaceDummyNamespace;

use FondBot\Contracts\Conversation\Activator;
use FondBot\Events\MessageReceived;
use FondBot\Contracts\Conversation\Activator;

class DummyClass implements Activator
{
Expand Down
11 changes: 10 additions & 1 deletion resources/stubs/FondBotServiceProvider.stub
@@ -1,8 +1,12 @@
<?php

declare(strict_types=1);

namespace App\Providers;

use FondBot\FondBot;
use Illuminate\Support\ServiceProvider;
use FondBot\FondBotApplicationServiceProvider as ServiceProvider;

class FondBotServiceProvider extends ServiceProvider
{
Expand All @@ -13,7 +17,12 @@ class FondBotServiceProvider extends ServiceProvider
*/
public function boot()
{
//
parent::boot();
}

protected function intents(): void
{
FondBot::intentsIn(app_path('Intents'));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion resources/stubs/Intent.stub
Expand Up @@ -4,9 +4,9 @@ declare(strict_types=1);

namespace DummyRootNamespaceDummyNamespace;

use FondBot\Conversation\Activators\Exact;
use FondBot\Conversation\Intent;
use FondBot\Events\MessageReceived;
use FondBot\Conversation\Activators\Exact;

class DummyClass extends Intent
{
Expand Down
2 changes: 1 addition & 1 deletion resources/stubs/Interaction.stub
Expand Up @@ -4,8 +4,8 @@ declare(strict_types=1);

namespace DummyRootNamespaceDummyNamespace;

use FondBot\Conversation\Interaction;
use FondBot\Events\MessageReceived;
use FondBot\Conversation\Interaction;

class DummyClass extends Interaction
{
Expand Down
25 changes: 25 additions & 0 deletions src/FondBotApplicationServiceProvider.php
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

namespace FondBot;

use Illuminate\Support\ServiceProvider;

class FondBotApplicationServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
FondBot::routes();
}

protected function intents(): void
{
FondBot::intentsIn(app_path('Intents'));
}
}

0 comments on commit e3e193b

Please sign in to comment.