Skip to content

Commit

Permalink
Update Type
Browse files Browse the repository at this point in the history
  • Loading branch information
emrancu committed Jul 28, 2022
1 parent 6cf360b commit 92f0bd4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class Schema implements SchemaInterface
{
private static $instance = null;
private string $sql;
private string $table = '';
private string $column = '';
Expand Down Expand Up @@ -69,7 +68,7 @@ public static function rawSql(string $sql): self
* @param string|int $places
* @return Schema
*/
public function decimal(string $column, string|int $length = 20, string|int $places = 2): self
public function decimal(string $column, int $length = 20, int $places = 2): self
{
$this->currentColumn = "`".$column."` decimal(".$length.",".$places.")";
$this->addColumn($this->currentColumn);
Expand Down Expand Up @@ -125,10 +124,10 @@ public function intIncrements(string $column): self

/**
* @param string $column
* @param string|int $length
* @param int $length
* @return Schema
*/
public function integer(string $column, string|int $length = 10): self
public function integer(string $column, int $length = 10): self
{
$this->currentColumn = "`".$column."` int(".$length.")";
$this->addColumn($this->currentColumn);
Expand Down Expand Up @@ -205,7 +204,7 @@ public function bigIntIncrements(string $column): self
* @param string|int $length
* @return Schema
*/
public function bigInt(string $column, string|int $length = 20): self
public function bigInt(string $column, int $length = 20): self
{
$this->currentColumn = "`".$column."` bigint(".$length.")";
$this->addColumn($this->currentColumn);
Expand All @@ -214,10 +213,10 @@ public function bigInt(string $column, string|int $length = 20): self

/**
* @param string $column
* @param int|string $length
* @param int $length
* @return Schema
*/
public function string(string $column, int|string $length = 255): self
public function string(string $column, int $length = 255): self
{
$this->currentColumn = "`".$column."` varchar(".$length.")";
$this->addColumn($this->currentColumn);
Expand Down Expand Up @@ -271,7 +270,7 @@ public function nullable(): self
* @param mixed $value
* @return Schema
*/
public function default(mixed $value): self
public function default($value): self
{
$this->defaultValue = $value;
$this->updateColumn($this->currentColumn);
Expand Down

0 comments on commit 92f0bd4

Please sign in to comment.