Skip to content

Commit e8e3d8b

Browse files
committed
Fixed code style
1 parent 85e61be commit e8e3d8b

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

src/Data/Schema.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function getData()
4141
$details['type'] = $columnType.$this->determineUnsigned($column);
4242
$details['length'] = $length != 0 ? $length : null;
4343
$details['default'] = $this->getDefaultValue($column);
44-
$details['nullable'] = $this->getExpression(true === ! $column->getNotNull());
44+
$details['nullable'] = $this->getExpression(! $column->getNotNull() === true);
4545
$details['comment'] = $column->getComment();
4646

4747
$this->collections[$table][] = $details;
@@ -53,12 +53,12 @@ public function getData()
5353

5454
private function determineUnsigned($column)
5555
{
56-
return (true === $column->getUnsigned()) ? '(unsigned)' : '';
56+
return ($column->getUnsigned() === true) ? '(unsigned)' : '';
5757
}
5858

5959
private function getDefaultValue($column)
6060
{
61-
if ('boolean' == $column->getType()->getName()) {
61+
if ($column->getType()->getName() == 'boolean') {
6262
return $column->getDefault() ? 'true' : 'false';
6363
}
6464

src/LaravelDbDoc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public static function routes()
2525

2626
return response($content, 200, [
2727
'Content-Type' => 'text/csv',
28-
'Content-Disposition' => 'attachment; filename="' . $filename . '"',
28+
'Content-Disposition' => 'attachment; filename="'.$filename.'"',
2929
]);
3030
}
3131

@@ -58,9 +58,9 @@ public static function filename($format)
5858
throw_if(! in_array($format, ['json', 'markdown', 'csv']));
5959

6060
$extension = match ($format) {
61-
'markdown' => 'md',
62-
'csv' => 'csv',
63-
default => 'json',
61+
'markdown' => 'md',
62+
'csv' => 'csv',
63+
default => 'json',
6464
};
6565

6666
return config('app.name')." Database Schema.$extension";

src/Presentation/Csv.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Bekwoh\LaravelDbDoc\Presentation;
44

55
use Bekwoh\LaravelDbDoc\Contracts\Presenter;
6-
use Illuminate\Support\Str;
76

87
class Csv extends AbstractPresenter implements Presenter
98
{

src/Presentation/Markdown.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Bekwoh\LaravelDbDoc\Presentation;
44

55
use Bekwoh\LaravelDbDoc\Contracts\Presenter;
6-
use Illuminate\Support\Str;
76

87
class Markdown extends AbstractPresenter implements Presenter
98
{

0 commit comments

Comments
 (0)