@@ -69,8 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | if(is_object($object)){ |
| 71 | 71 | $type = static::checkValidEloquent($object); |
| 72 | - } |
|
| 73 | - else{ |
|
| 72 | + } else{ |
|
| 74 | 73 | $type = (new $object)->getTable(); |
| 75 | 74 | } |
| 76 | 75 | return ["type"=>$type]; |
@@ -137,10 +136,11 @@ discard block |
||
| 137 | 136 | */ |
| 138 | 137 | protected static function checkValidEloquent($object) |
| 139 | 138 | { |
| 140 | - if (is_subclass_of($object, '\Illuminate\Database\Eloquent\Model')) |
|
| 141 | - $type = $object->getTable(); |
|
| 142 | - else |
|
| 143 | - throw new NotValidEloquentException('Not a valid object, class should be extending Eloquent Model class.'); |
|
| 139 | + if (is_subclass_of($object, '\Illuminate\Database\Eloquent\Model')) { |
|
| 140 | + $type = $object->getTable(); |
|
| 141 | + } else { |
|
| 142 | + throw new NotValidEloquentException('Not a valid object, class should be extending Eloquent Model class.'); |
|
| 143 | + } |
|
| 144 | 144 | return $type; |
| 145 | 145 | } |
| 146 | 146 | } |
| 147 | 147 | \ No newline at end of file |
@@ -68,8 +68,7 @@ discard block |
||
| 68 | 68 | $input = $this->ask('For safety please enter this text "'.$password.'"'); |
| 69 | 69 | if($input == $password){ |
| 70 | 70 | return $this->buildIndex(); |
| 71 | - } |
|
| 72 | - else { |
|
| 71 | + } else { |
|
| 73 | 72 | return $this->error('Password is incorrect!'); |
| 74 | 73 | } |
| 75 | 74 | } |
@@ -89,8 +88,7 @@ discard block |
||
| 89 | 88 | if(is_array($response) && $response['acknowledged'] == true) |
| 90 | 89 | { |
| 91 | 90 | $this->info('Index Initialization Successful'); |
| 92 | - } |
|
| 93 | - else{ |
|
| 91 | + } else{ |
|
| 94 | 92 | $this->error('Index Initialization Failed'); |
| 95 | 93 | } |
| 96 | 94 | } |