Skip to content

Commit

Permalink
Bug fixes (#12)
Browse files Browse the repository at this point in the history
* Update SetAutoIncrementCommand.php

* Scrutinizer Auto-Fixes (#13)

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com

Co-authored-by: Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
  • Loading branch information
sausin and scrutinizer-auto-fixer authored Apr 11, 2020
1 parent b76e1c0 commit bd6d3a9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Commands/SetAutoIncrementCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Sausin\DBSetAutoIncrement\Commands;

use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Config;
use Sausin\DBSetAutoIncrement\DatabaseInfo;
use Sausin\DBSetAutoIncrement\GetAttribute;
Expand Down Expand Up @@ -39,6 +40,9 @@ class SetAutoIncrementCommand extends Command
/** @var string */
protected $mode;

/** @var string */
protected $driver;

/** @var int */
protected $autoIncrement;

Expand Down Expand Up @@ -76,7 +80,7 @@ public function handle()
$this->autoIncrement = $this->option('value') ?? Config::get('auto-increment.autoIncrement', 100001);

if (! $this->isDatabaseCompatible()) {
$this->info("Database {$driver} not supported");
$this->info("Database {$this->driver} not supported");

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Listeners/SetAutoIncrement.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct()
/**
* Handle the event.
*
* @param object $event
* @param MigrationsEnded $event
* @return void
*/
public function handle(MigrationsEnded $event)
Expand Down
3 changes: 3 additions & 0 deletions src/UpdateAttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

trait UpdateAttribute
{
/**
* @param string $driver
*/
protected function updateAutoIncrement($driver, $table): void
{
$method = "update{$driver}AutoIncrement";
Expand Down

0 comments on commit bd6d3a9

Please sign in to comment.