@@ -18,7 +18,7 @@ class Autolink
1818 */
1919 public array $ options = [
2020 'strip_scheme ' => false ,
21- 'text_limit ' => false ,
21+ 'text_limit ' => null ,
2222 'auto_title ' => false ,
2323 'escape ' => true ,
2424 'link_no_scheme ' => false
@@ -194,12 +194,12 @@ public function link(string $url, array $attribs = []): string
194194 /**
195195 * buildLink
196196 *
197- * @param string $url
198- * @param array $attribs
197+ * @param string|null $url
198+ * @param array $attribs
199199 *
200200 * @return string
201201 */
202- protected function buildLink (string $ url = null , array $ attribs = []): string
202+ protected function buildLink (? string $ url = null , array $ attribs = []): string
203203 {
204204 if (is_callable ($ this ->linkBuilder )) {
205205 return (string ) ($ this ->linkBuilder )($ url , $ attribs );
@@ -236,7 +236,7 @@ public function stripScheme(bool $value = false): static
236236
237237 public function isStripScheme (): bool
238238 {
239- return $ this ->getOption ('strip_scheme ' );
239+ return ( bool ) $ this ->getOption ('strip_scheme ' );
240240 }
241241
242242 public function autoEscape (bool $ value = true ): static
@@ -246,13 +246,11 @@ public function autoEscape(bool $value = true): static
246246
247247 public function isAutoEscape (): bool
248248 {
249- return $ this ->getOption ('escape ' );
249+ return ( bool ) $ this ->getOption ('escape ' );
250250 }
251251
252252 /**
253- * textLimit
254- *
255- * @param int|callable $value
253+ * @param int|callable|null $value
256254 *
257255 * @return static
258256 */
@@ -280,7 +278,7 @@ public function autoTitle(bool $value = false): static
280278
281279 public function isAutoTitle (): bool
282280 {
283- return $ this ->getOption ('auto_title ' );
281+ return ( bool ) $ this ->getOption ('auto_title ' );
284282 }
285283
286284 /**
@@ -442,8 +440,6 @@ public function setLinkBuilder(callable $linkBuilder): static
442440 }
443441
444442 /**
445- * shorten
446- *
447443 * @param string $url
448444 * @param int $lastPartLimit
449445 * @param int $dots
0 commit comments