Skip to content

Commit 1aaf07c

Browse files
committed
displaying names of generated files
1 parent c929fd6 commit 1aaf07c

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

src/Commands/RepositoryMakeCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function handle()
4848
*/
4949
protected function buildClass($name)
5050
{
51+
$this->type = $this->type . ' ' . $name;
52+
5153
$model = $this->option('model');
5254

5355
$scopes = $this->option('scopes');

src/Commands/RepositoryScopeMakeCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class RepositoryScopeMakeCommand extends GeneratorCommand
3535
*/
3636
public function handle()
3737
{
38-
if (parent::handle() === false && ! $this->option('force')) {
39-
return false;
38+
if (parent::handle() === false) {
39+
return true;
4040
}
4141
}
4242

@@ -48,6 +48,8 @@ public function handle()
4848
*/
4949
protected function buildClass($name)
5050
{
51+
$this->type = $this->type . ' ' . $name;
52+
5153
return (new Replacer(parent::buildClass($name)))
5254
->replace($name);
5355
}

src/Commands/RepositoryScopesMakeCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function handle()
4848
*/
4949
protected function buildClass($name)
5050
{
51+
$this->type = $this->type . ' ' . $name;
52+
5153
$stub = (new Replacer(parent::buildClass($name)))
5254
->replace($name);
5355

tests/Unit/RepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function it_can_smart_paginate_if_request_parametert_is_string()
374374
$repository = new Repository;
375375

376376
request()->merge([
377-
config('awesio-repository.smart_paginate.request_parameter') => uniqid()
377+
config('awesio-repository.smart_paginate.request_parameter') => 'string'
378378
]);
379379

380380
$result = $repository->smartPaginate();

0 commit comments

Comments
 (0)