Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/ChannelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ChannelMakeCommand extends GeneratorCommand
protected function buildClass($name)
{
return str_replace(
'DummyUser',
['DummyUser', '{{ userModel }}'],
class_basename($this->userProviderModel()),
parent::buildClass($name)
);
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/ComponentMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@ protected function buildClass($name)
{
if ($this->option('inline')) {
return str_replace(
'DummyView',
['DummyView', '{{ view }}'],
"<<<'blade'\n<div>\n <!-- ".Inspiring::quote()." -->\n</div>\nblade",
parent::buildClass($name)
);
}

return str_replace(
'DummyView',
['DummyView', '{{ view }}'],
'view(\'components.'.$this->getView().'\')',
parent::buildClass($name)
);
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/ListenerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ protected function buildClass($name)
}

$stub = str_replace(
'DummyEvent', class_basename($event), parent::buildClass($name)
['DummyEvent', '{{ event }}'], class_basename($event), parent::buildClass($name)
);

return str_replace(
'DummyFullEvent', trim($event, '\\'), $stub
['DummyFullEvent', '{{ eventNamespace }}'], trim($event, '\\'), $stub
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/MailMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function buildClass($name)
$class = parent::buildClass($name);

if ($this->option('markdown') !== false) {
$class = str_replace('DummyView', $this->getView(), $class);
$class = str_replace(['DummyView', '{{ view }}'], $this->getView(), $class);
}

return $class;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function buildClass($name)
$class = parent::buildClass($name);

if ($this->option('markdown')) {
$class = str_replace('DummyView', $this->option('markdown'), $class);
$class = str_replace(['DummyView', '{{ view }}'], $this->option('markdown'), $class);
}

return $class;
Expand Down
8 changes: 4 additions & 4 deletions src/Illuminate/Foundation/Console/StubPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public function handle()

$files = [
__DIR__.'/stubs/cast.stub' => $stubsPath.'/cast.stub',
__DIR__.'/stubs/console.stub' => $stubsPath.'/console.stub',
__DIR__.'/stubs/event.stub' => $stubsPath.'/event.stub',
__DIR__.'/stubs/job.queued.stub' => $stubsPath.'/job.queued.stub',
__DIR__.'/stubs/job.stub' => $stubsPath.'/job.stub',
Expand All @@ -45,21 +46,20 @@ public function handle()
__DIR__.'/stubs/notification.stub' => $stubsPath.'/notification.stub',
__DIR__.'/stubs/observer.plain.stub' => $stubsPath.'/observer.plain.stub',
__DIR__.'/stubs/observer.stub' => $stubsPath.'/observer.stub',
__DIR__.'/stubs/policy.plain.stub' => $stubsPath.'/policy.plain.stub',
__DIR__.'/stubs/policy.stub' => $stubsPath.'/policy.stub',
__DIR__.'/stubs/provider.stub' => $stubsPath.'/provider.stub',
__DIR__.'/stubs/request.stub' => $stubsPath.'/request.stub',
__DIR__.'/stubs/resource-collection.stub' => $stubsPath.'/resource-collection.stub',
__DIR__.'/stubs/resource.stub' => $stubsPath.'/resource.stub',
__DIR__.'/stubs/rule.stub' => $stubsPath.'/rule.stub',
__DIR__.'/stubs/test.stub' => $stubsPath.'/test.stub',
__DIR__.'/stubs/test.unit.stub' => $stubsPath.'/test.unit.stub',
realpath(__DIR__.'/../../Database/Console/Factories/stubs/factory.stub') => $stubsPath.'/factory.stub',
realpath(__DIR__.'/../../Database/Console/Seeds/stubs/seeder.stub') => $stubsPath.'/seeder.stub',
realpath(__DIR__.'/../../Database/Migrations/stubs/migration.create.stub') => $stubsPath.'/migration.create.stub',
realpath(__DIR__.'/../../Database/Migrations/stubs/migration.stub') => $stubsPath.'/migration.stub',
realpath(__DIR__.'/../../Database/Migrations/stubs/migration.update.stub') => $stubsPath.'/migration.update.stub',
realpath(__DIR__.'/../../Foundation/Console/stubs/console.stub') => $stubsPath.'/console.stub',
realpath(__DIR__.'/../../Foundation/Console/stubs/policy.plain.stub') => $stubsPath.'/policy.plain.stub',
realpath(__DIR__.'/../../Foundation/Console/stubs/policy.stub') => $stubsPath.'/policy.stub',
realpath(__DIR__.'/../../Foundation/Console/stubs/rule.stub') => $stubsPath.'/rule.stub',
realpath(__DIR__.'/../../Routing/Console/stubs/controller.api.stub') => $stubsPath.'/controller.api.stub',
realpath(__DIR__.'/../../Routing/Console/stubs/controller.invokable.stub') => $stubsPath.'/controller.invokable.stub',
realpath(__DIR__.'/../../Routing/Console/stubs/controller.model.api.stub') => $stubsPath.'/controller.model.api.stub',
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Foundation/Console/stubs/channel.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use NamespacedDummyUserModel;
use {{ namespacedUserModel }};

class DummyClass
class {{ class }}
{
/**
* Create a new channel instance.
Expand All @@ -19,10 +19,10 @@ class DummyClass
/**
* Authenticate the user's access to the channel.
*
* @param \NamespacedDummyUserModel $user
* @param \{{ namespacedUserModel }} $user
* @return array|bool
*/
public function join(DummyUser $user)
public function join({{ userModel }} $user)
{
//
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Exception;

class DummyClass extends Exception
class {{ class }} extends Exception
{
/**
* Report the exception.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/stubs/exception-render.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Exception;

class DummyClass extends Exception
class {{ class }} extends Exception
{
/**
* Render the exception as an HTTP response.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/stubs/exception-report.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Exception;

class DummyClass extends Exception
class {{ class }} extends Exception
{
/**
* Report the exception.
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/stubs/exception.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Exception;

class DummyClass extends Exception
class {{ class }} extends Exception
{
//
}
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/stubs/listener-duck.stub
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class DummyClass
class {{ class }}
{
/**
* Create the event listener.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class DummyClass implements ShouldQueue
class {{ class }} implements ShouldQueue
{
use InteractsWithQueue;

Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Foundation/Console/stubs/listener-queued.stub
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use DummyFullEvent;
use {{ eventNamespace }};
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class DummyClass implements ShouldQueue
class {{ class }} implements ShouldQueue
{
use InteractsWithQueue;

Expand All @@ -23,10 +23,10 @@ class DummyClass implements ShouldQueue
/**
* Handle the event.
*
* @param DummyEvent $event
* @param {{ eventNamespace }} $event
* @return void
*/
public function handle(DummyEvent $event)
public function handle({{ event }} $event)
{
//
}
Expand Down
10 changes: 5 additions & 5 deletions src/Illuminate/Foundation/Console/stubs/listener.stub
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use DummyFullEvent;
use {{ eventNamespace }};
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class DummyClass
class {{ class }}
{
/**
* Create the event listener.
Expand All @@ -21,10 +21,10 @@ class DummyClass
/**
* Handle the event.
*
* @param DummyEvent $event
* @param \{{ eventNamespace }} $event
* @return void
*/
public function handle(DummyEvent $event)
public function handle({{ event }} $event)
{
//
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/stubs/markdown-mail.stub
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ class {{ class }} extends Mailable
*/
public function build()
{
return $this->markdown('DummyView');
return $this->markdown('{{ view }}');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class {{ class }} extends Notification
*/
public function toMail($notifiable)
{
return (new MailMessage)->markdown('DummyView');
return (new MailMessage)->markdown('{{ view }}');
}

/**
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Foundation/Console/stubs/view-component.stub
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace DummyNamespace;
namespace {{ namespace }};

use Illuminate\View\Component;

class DummyClass extends Component
class {{ class }} extends Component
{
/**
* Create a new component instance.
Expand All @@ -23,6 +23,6 @@ class DummyClass extends Component
*/
public function render()
{
return DummyView;
return {{ view }};
}
}