@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | { |
| 196 | 196 | parent::__construct($data); |
| 197 | 197 | |
| 198 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 198 | + if (is_callable([$this, 'defaultData'])) { |
|
| 199 | 199 | $defaultData = $this->metadata()->defaultData(); |
| 200 | 200 | if ($defaultData) { |
| 201 | 201 | $this->setData($defaultData); |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | */ |
| 389 | 389 | public function heading() |
| 390 | 390 | { |
| 391 | - $heading = $this->render((string)$this->heading); |
|
| 391 | + $heading = $this->render((string) $this->heading); |
|
| 392 | 392 | |
| 393 | 393 | if (!$heading) { |
| 394 | 394 | $heading = $this->translator()->translation('{{ objType }} #{{ id }}', [ |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | public function preview() |
| 432 | 432 | { |
| 433 | 433 | if ($this->preview) { |
| 434 | - return $this->render((string)$this->preview); |
|
| 434 | + return $this->render((string) $this->preview); |
|
| 435 | 435 | } |
| 436 | 436 | |
| 437 | 437 | return ''; |
@@ -1051,19 +1051,19 @@ discard block |
||
| 1051 | 1051 | static $search; |
| 1052 | 1052 | |
| 1053 | 1053 | if ($search === null) { |
| 1054 | - $attr = [ 'href', 'link', 'url', 'src' ]; |
|
| 1055 | - $scheme = [ '../', './', '/', 'data', 'ftp', 'http', 'mailto', 'sftp', 'ssh', 'tel', 'urn' ]; |
|
| 1054 | + $attr = ['href', 'link', 'url', 'src']; |
|
| 1055 | + $scheme = ['../', './', '/', 'data', 'ftp', 'http', 'mailto', 'sftp', 'ssh', 'tel', 'urn']; |
|
| 1056 | 1056 | |
| 1057 | 1057 | $search = sprintf( |
| 1058 | 1058 | '(?<=%1$s=")(?!%2$s)(\S+)(?=")', |
| 1059 | - implode('="|', array_map('preg_quote', $attr, [ '~' ])), |
|
| 1060 | - implode('|', array_map('preg_quote', $scheme, [ '~' ])) |
|
| 1059 | + implode('="|', array_map('preg_quote', $attr, ['~'])), |
|
| 1060 | + implode('|', array_map('preg_quote', $scheme, ['~'])) |
|
| 1061 | 1061 | ); |
| 1062 | 1062 | } |
| 1063 | 1063 | |
| 1064 | 1064 | $text = preg_replace_callback( |
| 1065 | 1065 | '~'.$search.'~i', |
| 1066 | - function ($matches) { |
|
| 1066 | + function($matches) { |
|
| 1067 | 1067 | return $this->createAbsoluteUrl($matches[1]); |
| 1068 | 1068 | }, |
| 1069 | 1069 | $text |