File tree 3 files changed +7
-4
lines changed
3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 3
3
namespace Larapack \Hooks \Commands ;
4
4
5
5
use Illuminate \Console \Command ;
6
+ use Illuminate \Support \Str ;
6
7
use Larapack \Hooks \Hooks ;
7
8
8
9
class MakeCommand extends Command
@@ -28,7 +29,7 @@ public function fire()
28
29
public function handle ()
29
30
{
30
31
$ name = $ this ->argument ('name ' );
31
- $ name = kebab_case ($ name );
32
+ $ name = Str:: kebab ($ name );
32
33
33
34
$ this ->hooks ->make ($ name );
34
35
Original file line number Diff line number Diff line change 5
5
use ArrayAccess ;
6
6
use Illuminate \Contracts \Support \Arrayable ;
7
7
use Illuminate \Filesystem \Filesystem ;
8
+ use Illuminate \Support \Str ;
8
9
9
10
class Hook implements ArrayAccess, Arrayable
10
11
{
@@ -128,7 +129,7 @@ public function mergeWithJson($path)
128
129
129
130
public function setAttribute ($ key , $ value )
130
131
{
131
- $ method = camel_case ('set_ ' .$ key .'_attribute ' );
132
+ $ method = Str:: camel ('set_ ' .$ key .'_attribute ' );
132
133
133
134
if (method_exists ($ this , $ method )) {
134
135
return $ this ->$ method ($ value );
@@ -139,7 +140,7 @@ public function setAttribute($key, $value)
139
140
140
141
public function getAttribute ($ key )
141
142
{
142
- $ method = camel_case ('get_ ' .$ key .'_attribute ' );
143
+ $ method = Str:: camel ('get_ ' .$ key .'_attribute ' );
143
144
144
145
if (method_exists ($ this , $ method )) {
145
146
return $ this ->$ method ();
Original file line number Diff line number Diff line change 6
6
use Illuminate \Filesystem \Filesystem ;
7
7
use Illuminate \Foundation \Application ;
8
8
use Illuminate \Support \Arr ;
9
+ use Illuminate \Support \Str ;
9
10
use Symfony \Component \Console \Input \ArrayInput ;
10
11
11
12
class Hooks
@@ -479,7 +480,7 @@ public function disable($name)
479
480
*/
480
481
public function make ($ name )
481
482
{
482
- $ studlyCase = studly_case ($ name );
483
+ $ studlyCase = Str:: studly ($ name );
483
484
484
485
// Check if already exists
485
486
if ($ this ->downloaded ($ name )) {
You can’t perform that action at this time.
0 commit comments