@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | } else { |
31 | 31 | $method = 'set'.ucfirst($name); |
32 | 32 | if (method_exists($this, 'set'.ucfirst($name))) { |
33 | - $this->attributes[$name] = $this->{$method}($value); |
|
33 | + $this->attributes[ $name ] = $this->{$method}($value); |
|
34 | 34 | } else { |
35 | - $this->attributes[$name] = $value; |
|
35 | + $this->attributes[ $name ] = $value; |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function __isset($name) |
69 | 69 | { |
70 | - return isset($this->attributes[$name]); |
|
70 | + return isset($this->attributes[ $name ]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
@@ -75,6 +75,6 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function __unset($name) |
77 | 77 | { |
78 | - unset($this->attributes[$name]); |
|
78 | + unset($this->attributes[ $name ]); |
|
79 | 79 | } |
80 | 80 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | $userClass = $this->getUserClass(); |
55 | 55 | |
56 | - $headers = ['id', 'name', 'email']; |
|
56 | + $headers = [ 'id', 'name', 'email' ]; |
|
57 | 57 | $users = $userClass::get($headers); |
58 | 58 | |
59 | 59 | $this->table($headers, $users); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | return; |
70 | 70 | } |
71 | 71 | |
72 | - if (! is_null($userClass::where('email', $email)->first())) { |
|
72 | + if (!is_null($userClass::where('email', $email)->first())) { |
|
73 | 73 | $this->error("User with same email [{$email}] exists."); |
74 | 74 | |
75 | 75 | return; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | $confirm = $this->confirm("Are you sure want to delete user with id [{$id}]?", false); |
123 | - if (! $confirm) { |
|
123 | + if (!$confirm) { |
|
124 | 124 | return; |
125 | 125 | } |
126 | 126 | |
@@ -173,9 +173,9 @@ discard block |
||
173 | 173 | protected function getOptions() |
174 | 174 | { |
175 | 175 | return [ |
176 | - ['create', 'c', InputOption::VALUE_NONE, 'Create new user.'], |
|
177 | - ['delete', 'd', InputOption::VALUE_NONE, 'Delete user.'], |
|
178 | - ['password', 'p', InputOption::VALUE_NONE, 'Change user password.'], |
|
176 | + [ 'create', 'c', InputOption::VALUE_NONE, 'Create new user.' ], |
|
177 | + [ 'delete', 'd', InputOption::VALUE_NONE, 'Delete user.' ], |
|
178 | + [ 'password', 'p', InputOption::VALUE_NONE, 'Change user password.' ], |
|
179 | 179 | ]; |
180 | 180 | } |
181 | 181 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | protected function getArguments() |
83 | 83 | { |
84 | 84 | $arguments = parent::getArguments(); |
85 | - $arguments[] = ['model', InputArgument::REQUIRED, 'The name of the model class']; |
|
85 | + $arguments[ ] = [ 'model', InputArgument::REQUIRED, 'The name of the model class' ]; |
|
86 | 86 | |
87 | 87 | return $arguments; |
88 | 88 | } |
@@ -32,8 +32,8 @@ |
||
32 | 32 | */ |
33 | 33 | public function setPasswordAttribute($value) |
34 | 34 | { |
35 | - if (! empty($value)) { |
|
36 | - $this->attributes['password'] = bcrypt($value); |
|
35 | + if (!empty($value)) { |
|
36 | + $this->attributes[ 'password' ] = bcrypt($value); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | } |
@@ -23,5 +23,5 @@ |
||
23 | 23 | * |
24 | 24 | * @return \BladeView|bool|\Illuminate\Contracts\View\Factory|\Illuminate\View\View |
25 | 25 | */ |
26 | - public function view($view, $data = [], $mergeData = []); |
|
26 | + public function view($view, $data = [ ], $mergeData = [ ]); |
|
27 | 27 | } |
@@ -142,14 +142,14 @@ |
||
142 | 142 | * |
143 | 143 | * @return string |
144 | 144 | */ |
145 | - public function getDisplayUrl(array $parameters = []); |
|
145 | + public function getDisplayUrl(array $parameters = [ ]); |
|
146 | 146 | |
147 | 147 | /** |
148 | 148 | * @param array $parameters |
149 | 149 | * |
150 | 150 | * @return string |
151 | 151 | */ |
152 | - public function getCreateUrl(array $parameters = []); |
|
152 | + public function getCreateUrl(array $parameters = [ ]); |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * @return string |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | /** |
29 | 29 | * @var array |
30 | 30 | */ |
31 | - protected $validationRules = []; |
|
31 | + protected $validationRules = [ ]; |
|
32 | 32 | |
33 | 33 | public function __construct() |
34 | 34 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | public function getValidationMessages() |
47 | 47 | { |
48 | - return []; |
|
48 | + return [ ]; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | */ |
54 | 54 | public function getValidationLabels() |
55 | 55 | { |
56 | - return []; |
|
56 | + return [ ]; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function addValidationRule($rule, $message = null) |
74 | 74 | { |
75 | - $this->validationRules[] = $rule; |
|
75 | + $this->validationRules[ ] = $rule; |
|
76 | 76 | |
77 | 77 | return $this; |
78 | 78 | } |
@@ -84,13 +84,13 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function setValidationRules($validationRules) |
86 | 86 | { |
87 | - if (! is_array($validationRules)) { |
|
87 | + if (!is_array($validationRules)) { |
|
88 | 88 | $validationRules = func_get_args(); |
89 | 89 | } |
90 | 90 | |
91 | - $this->validationRules = []; |
|
91 | + $this->validationRules = [ ]; |
|
92 | 92 | foreach ($validationRules as $rule) { |
93 | - $this->validationRules[] = explode('|', $rule); |
|
93 | + $this->validationRules[ ] = explode('|', $rule); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | return $this; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function setItems($items) |
42 | 42 | { |
43 | - if (! is_array($items)) { |
|
43 | + if (!is_array($items)) { |
|
44 | 44 | $items = func_get_args(); |
45 | 45 | } |
46 | 46 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function addHeader($items) |
70 | 70 | { |
71 | - if (! is_array($items)) { |
|
71 | + if (!is_array($items)) { |
|
72 | 72 | $items = func_get_args(); |
73 | 73 | } |
74 | 74 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public function addBody($items) |
86 | 86 | { |
87 | - if (! is_array($items)) { |
|
87 | + if (!is_array($items)) { |
|
88 | 88 | $items = func_get_args(); |
89 | 89 | } |
90 | 90 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public function addFooter($items) |
106 | 106 | { |
107 | - if (! is_array($items)) { |
|
107 | + if (!is_array($items)) { |
|
108 | 108 | $items = func_get_args(); |
109 | 109 | } |
110 | 110 |
@@ -14,14 +14,14 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * @var array |
16 | 16 | */ |
17 | - protected $data = []; |
|
17 | + protected $data = [ ]; |
|
18 | 18 | |
19 | 19 | /** |
20 | 20 | * @param string $view |
21 | 21 | * @param array $data |
22 | 22 | * @param Closure $callback |
23 | 23 | */ |
24 | - public function __construct($view, array $data = [], Closure $callback = null) |
|
24 | + public function __construct($view, array $data = [ ], Closure $callback = null) |
|
25 | 25 | { |
26 | 26 | $this->setView($view); |
27 | 27 | $this->setData($data); |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | { |
47 | 47 | $this->view = $view; |
48 | 48 | |
49 | - $this->setDisplay(function ($model) { |
|
50 | - $this->data['model'] = $model; |
|
49 | + $this->setDisplay(function($model) { |
|
50 | + $this->data[ 'model' ] = $model; |
|
51 | 51 | |
52 | 52 | return view($this->getView(), $this->data); |
53 | 53 | }); |