Upgrade to 3.9.1
This commit is contained in:
@@ -1612,13 +1612,11 @@ class App
|
||||
* Uses the snippet component to create
|
||||
* and return a template snippet
|
||||
*
|
||||
* @param mixed $name
|
||||
* @param array|object $data Variables or an object that becomes `$item`
|
||||
* @param bool $return On `false`, directly echo the snippet
|
||||
* @return string|null
|
||||
* @psalm-return ($return is true ? string : null)
|
||||
*/
|
||||
public function snippet($name, $data = [], bool $return = true, bool $slots = false): Snippet|string|null
|
||||
public function snippet(string|array|null $name, $data = [], bool $return = true, bool $slots = false): Snippet|string|null
|
||||
{
|
||||
if (is_object($data) === true) {
|
||||
$data = ['item' => $data];
|
||||
|
||||
Reference in New Issue
Block a user