Skip to content

Commit 4bab3d6

Browse files
committed
Add check for config existence
1 parent 6737eda commit 4bab3d6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "1.0.0",
2+
"version": "1.0.1",
33
"name": "protoqol/quasi",
44
"description": "Quasi",
55
"keywords": [

src/Console/QuasiResource.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ public function handle()
5151
/**
5252
* Replace the class name for the given stub.
5353
*
54-
* @param string $stub
55-
* @param string $name
54+
* @param string $stub
55+
* @param string $name
5656
*
5757
* @return string
5858
*/
@@ -68,7 +68,7 @@ protected function replaceClass($stub, $name): string
6868
/**
6969
* Replace keys.
7070
*
71-
* @param string $stub
71+
* @param string $stub
7272
*
7373
* @return string
7474
*/
@@ -81,8 +81,10 @@ protected function replaceKeys(string &$stub): string
8181
$string = '';
8282

8383
foreach ($columns as $column) {
84-
if (in_array($column, config('quasi.exclude'), true)) {
85-
continue;
84+
if (config('quasi.exclude', false)) {
85+
if (in_array($column, config('quasi.exclude'), true)) {
86+
continue;
87+
}
8688
}
8789

8890
$string .= "'$column' => \$this->$column,

0 commit comments

Comments
 (0)