9
9
use Illuminate \Support \Str ;
10
10
11
11
/**
12
- * @method $this title(string $title = null, ...$args) Set the title.
13
- * @method $this description(string $description = null, ...$args) Set the description.
14
- * @method $this keywords(string $keywords = null, ...$args) Set the keywords.
15
- * @method $this url(string $url = null, ...$args) Set the canonical URL.
16
- * @method $this site(string $site = null, ...$args) Set the site name.
17
- * @method $this image(string $url = null, ...$args) Set the cover image.
18
- * @method $this type(string $type = null, ...$args) Set the page type.
19
- * @method $this locale(string $locale = null, ...$args) Set the page locale.
12
+ * @method $this title(? string $title = null, ...$args) Set the title.
13
+ * @method $this description(? string $description = null, ...$args) Set the description.
14
+ * @method $this keywords(? string $keywords = null, ...$args) Set the keywords.
15
+ * @method $this url(? string $url = null, ...$args) Set the canonical URL.
16
+ * @method $this site(? string $site = null, ...$args) Set the site name.
17
+ * @method $this image(? string $url = null, ...$args) Set the cover image.
18
+ * @method $this type(? string $type = null, ...$args) Set the page type.
19
+ * @method $this locale(? string $locale = null, ...$args) Set the page locale.
20
20
* @method $this twitter(bool $enabled = true, ...$args) Enable the Twitter extension.
21
- * @method $this twitterCreator(string $username = null, ...$args) Set the Twitter author.
22
- * @method $this twitterSite(string $username = null, ...$args) Set the Twitter author.
23
- * @method $this twitterTitle(string $title = null, ...$args) Set the Twitter title.
24
- * @method $this twitterDescription(string $description = null, ...$args) Set the Twitter description.
25
- * @method $this twitterImage(string $url = null, ...$args) Set the Twitter cover image.
21
+ * @method $this twitterCreator(? string $username = null, ...$args) Set the Twitter author.
22
+ * @method $this twitterSite(? string $username = null, ...$args) Set the Twitter author.
23
+ * @method $this twitterTitle(? string $title = null, ...$args) Set the Twitter title.
24
+ * @method $this twitterDescription(? string $description = null, ...$args) Set the Twitter description.
25
+ * @method $this twitterImage(? string $url = null, ...$args) Set the Twitter cover image.
26
26
*/
27
27
class SEOManager
28
28
{
@@ -135,7 +135,7 @@ public function raw(string $key): string|null
135
135
}
136
136
137
137
/** Configure an extension. */
138
- public function extension (string $ name , bool $ enabled = true , string $ view = null ): static
138
+ public function extension (string $ name , bool $ enabled = true , ? string $ view = null ): static
139
139
{
140
140
$ this ->extensions [$ name ] = $ enabled ;
141
141
@@ -159,7 +159,7 @@ public function extensions(): array
159
159
}
160
160
161
161
/** Configure or use Flipp. */
162
- public function flipp (string $ alias , string |array $ data = null ): string |static
162
+ public function flipp (string $ alias , string |array | null $ data = null ): string |static
163
163
{
164
164
if (is_string ($ data )) {
165
165
$ this ->meta ("flipp.templates. $ alias " , $ data );
@@ -185,7 +185,7 @@ public function flipp(string $alias, string|array $data = null): string|static
185
185
}
186
186
187
187
/** Configure or use Previewify. */
188
- public function previewify (string $ alias , int |string |array $ data = null ): string |static
188
+ public function previewify (string $ alias , int |string |array | null $ data = null ): string |static
189
189
{
190
190
if (is_string ($ data ) || is_int ($ data )) {
191
191
$ this ->meta ("previewify.templates. $ alias " , (string ) $ data );
@@ -250,7 +250,7 @@ public function hasTag(string $property): bool
250
250
}
251
251
252
252
/** Add a head tag. */
253
- public function rawTag (string $ key , string $ tag = null ): static
253
+ public function rawTag (string $ key , ? string $ tag = null ): static
254
254
{
255
255
$ tag ??= $ key ;
256
256
@@ -275,7 +275,7 @@ public function tag(string $property, string $content): static
275
275
* @param string|array|null $value The value (if a single key is provided).
276
276
* @return $this|string|null
277
277
*/
278
- public function meta (string |array $ key , string |array $ value = null ): mixed
278
+ public function meta (string |array $ key , string |array | null $ value = null ): mixed
279
279
{
280
280
if (is_array ($ key )) {
281
281
/** @var array<string, string> $key */
0 commit comments