@@ -17,7 +17,7 @@ class DbView extends \Illuminate\View\View implements ArrayAccess, Renderable
17
17
/**
18
18
* DbView constructor.
19
19
*
20
- * @param Repository $config
20
+ * @param Repository $config
21
21
* @param DbBladeCompilerEngine $engine
22
22
*/
23
23
public function __construct (Repository $ config , DbBladeCompilerEngine $ engine )
@@ -29,10 +29,10 @@ public function __construct(Repository $config, DbBladeCompilerEngine $engine)
29
29
/**
30
30
* Get a evaluated view contents for the given view.
31
31
*
32
- * @param Model $model
33
- * @param array $data
34
- * @param array $mergeData
35
- * @param string $content_field
32
+ * @param Model $model
33
+ * @param array $data
34
+ * @param array $mergeData
35
+ * @param string $content_field
36
36
* @return DbView
37
37
*/
38
38
public function make (Model $ model , $ data = array (), $ mergeData = array (), $ content_field = null )
@@ -49,7 +49,7 @@ public function make(Model $model, $data = array(), $mergeData = array(), $conte
49
49
}
50
50
51
51
/**
52
- * @param string $content_field
52
+ * @param string $content_field
53
53
* @return DbView
54
54
*/
55
55
public function field ($ content_field )
@@ -62,7 +62,7 @@ public function field($content_field)
62
62
/**
63
63
* Get the string contents of the view.
64
64
*
65
- * @param callable $callback
65
+ * @param callable $callback
66
66
* @return string
67
67
*/
68
68
public function render (callable $ callback = null )
@@ -75,9 +75,9 @@ public function render(callable $callback = null)
75
75
// done rendering all views so that there is nothing left hanging over when
76
76
// anothoer view is rendered in the future by the application developers.
77
77
// Before flushing, check Laravel version for correct method use
78
- if ( version_compare (app ()->version (), '5.4.0 ' ) >= 0 )
78
+ if (version_compare (app ()->version (), '5.4.0 ' ) >= 0 )
79
79
View::flushStateIfDoneRendering ();
80
- else
80
+ else
81
81
View::flushSectionsIfDoneRendering ();
82
82
83
83
return $ response ?: $ contents ;
@@ -107,7 +107,7 @@ protected function renderContents()
107
107
108
108
protected function getContents ()
109
109
{
110
- $ field = $ this ->config ->get ('db-blade-compiler.model_property ' );
110
+ $ field = $ this ->config ->get ('db-blade-compiler.model_property ' );
111
111
$ this ->path ->{$ field } = $ this ->content_field ;
112
112
113
113
return parent ::getContents ();
@@ -116,7 +116,7 @@ protected function getContents()
116
116
/**
117
117
* Parse the given data into a raw array.
118
118
*
119
- * @param mixed $data
119
+ * @param mixed $data
120
120
* @return array
121
121
*/
122
122
protected function parseData ($ data )
@@ -145,9 +145,9 @@ public function gatherData()
145
145
/**
146
146
* Add a view instance to the view data.
147
147
*
148
- * @param string $key
149
- * @param string $view
150
- * @param array $data
148
+ * @param string $key
149
+ * @param string $view
150
+ * @param array $data
151
151
* @return \Illuminate\View\View
152
152
*/
153
153
public function nest ($ key , $ view , array $ data = array ())
@@ -158,44 +158,44 @@ public function nest($key, $view, array $data = array())
158
158
/**
159
159
* Determine if a piece of data is bound.
160
160
*
161
- * @param string $key
161
+ * @param string $key
162
162
* @return bool
163
163
*/
164
- public function offsetExists ($ key )
164
+ public function offsetExists ($ key ): bool
165
165
{
166
166
return array_key_exists ($ key , $ this ->data );
167
167
}
168
168
169
169
/**
170
170
* Get a piece of bound data to the view.
171
171
*
172
- * @param string $key
172
+ * @param string $key
173
173
* @return mixed
174
174
*/
175
- public function offsetGet ($ key )
175
+ public function offsetGet ($ key ): mixed
176
176
{
177
177
return $ this ->data [$ key ];
178
178
}
179
179
180
180
/**
181
181
* Set a piece of data on the view.
182
182
*
183
- * @param string $key
184
- * @param mixed $value
183
+ * @param string $key
184
+ * @param mixed $value
185
185
* @return void
186
186
*/
187
- public function offsetSet ($ key , $ value )
187
+ public function offsetSet ($ key , $ value ): void
188
188
{
189
189
$ this ->with ($ key , $ value );
190
190
}
191
191
192
192
/**
193
193
* Unset a piece of data from the view.
194
194
*
195
- * @param string $key
195
+ * @param string $key
196
196
* @return void
197
197
*/
198
- public function offsetUnset ($ key )
198
+ public function offsetUnset ($ key ): void
199
199
{
200
200
unset($ this ->data [$ key ]);
201
201
}
0 commit comments