@@ -49,7 +49,7 @@ public function sp(string $singular, string $plural, int $count, bool $autoTrans
4949 * @param array<string>|string|null $type - private/public or array of index/follow/archtive,...
5050 * @return string HTML
5151 */
52- public function metaRobots ($ type = null ): string {
52+ public function metaRobots (array | string | null $ type = null ): string {
5353 $ meta = Configure::read ('Config.robots ' );
5454 if ($ type === null && $ meta !== null ) {
5555 $ type = $ meta ;
@@ -78,7 +78,7 @@ public function metaRobots($type = null): string {
7878 * @param array<string>|string|null $content If array, it will be separated by commas
7979 * @return string HTML Markup
8080 */
81- public function metaName (?string $ name = null , $ content = null ): string {
81+ public function metaName (?string $ name = null , array | string | null $ content = null ): string {
8282 if (!$ name || !$ content ) {
8383 return '' ;
8484 }
@@ -115,7 +115,7 @@ public function metaDescription(string $content, ?string $language = null, array
115115 * @param bool $escape
116116 * @return string HTML Markup
117117 */
118- public function metaKeywords ($ keywords = null , ?string $ language = null , bool $ escape = true ): string {
118+ public function metaKeywords (array | string | null $ keywords = null , ?string $ language = null , bool $ escape = true ): string {
119119 if ($ keywords === null ) {
120120 $ keywords = Configure::read ('Config.keywords ' );
121121 }
@@ -142,7 +142,7 @@ public function metaKeywords($keywords = null, ?string $language = null, bool $e
142142 * @param bool $full
143143 * @return string HTML Markup
144144 */
145- public function metaCanonical ($ url = null , bool $ full = false ): string {
145+ public function metaCanonical (array | string | null $ url = null , bool $ full = false ): string {
146146 $ canonical = $ this ->Url ->build ($ url , ['fullBase ' => $ full ]);
147147 $ options = ['rel ' => 'canonical ' , 'link ' => $ canonical ];
148148
@@ -152,7 +152,7 @@ public function metaCanonical($url = null, bool $full = false): string {
152152 /**
153153 * Convenience method for "alternate" SEO links
154154 *
155- * @param array|string $url
155+ * @param array|string|null $url
156156 * @param array|string $lang (lang(iso2) or array of langs)
157157 * lang: language (in ISO 6391-1 format) + optionally the region (in ISO 3166-1 Alpha 2 format)
158158 * - de
@@ -161,7 +161,7 @@ public function metaCanonical($url = null, bool $full = false): string {
161161 * @param bool $full
162162 * @return string HTML Markup
163163 */
164- public function metaAlternate ($ url , $ lang , bool $ full = false ): string {
164+ public function metaAlternate (array | string | null $ url , array | string $ lang , bool $ full = false ): string {
165165 $ url = $ this ->Url ->build ($ url , ['fullBase ' => $ full ]);
166166 $ lang = (array )$ lang ;
167167 $ res = [];
@@ -185,11 +185,11 @@ public function metaAlternate($url, $lang, bool $full = false): string {
185185 /**
186186 * Convenience method for META Tags
187187 *
188- * @param array|string $url
188+ * @param array|string|null $url
189189 * @param string|null $title
190190 * @return string HTML Markup
191191 */
192- public function metaRss ($ url , ?string $ title = null ): string {
192+ public function metaRss (array | string | null $ url , ?string $ title = null ): string {
193193 $ tags = [
194194 'meta ' => '<link rel="alternate" type="application/rss+xml" title="%s" href="%s"> ' ,
195195 ];
0 commit comments