1
0
Fork 0
- added type-hints
- added returned type-hints in interface (I checked all)
This commit is contained in:
Roland Häder 2022-06-19 13:59:58 +02:00
commit bff57bb030
Signed by: roland
GPG key ID: C82EDE5DDFA0BA77
6 changed files with 20 additions and 20 deletions

View file

@ -164,7 +164,7 @@ abstract class MailBuilder
*
* @return string[][]
*/
public function getHeaders()
public function getHeaders(): array
{
return $this->headers;
}
@ -182,7 +182,7 @@ abstract class MailBuilder
* @param string[][] $headers
* @return $this
*/
public function withHeaders(array $headers)
public function withHeaders(array $headers): MailBuilder
{
$this->headers = $headers;

View file

@ -29,7 +29,7 @@ class Mimetype
* @param string $filename filename
* @return mixed array or string
*/
public static function getContentType($filename)
public static function getContentType(string $filename)
{
$mime_types = [

View file

@ -59,7 +59,7 @@ class ParseUrl
* @param string $accept content-type to accept
* @return array content type
*/
public static function getContentType(string $url, string $accept = HttpClientAccept::DEFAULT)
public static function getContentType(string $url, string $accept = HttpClientAccept::DEFAULT): array
{
$curlResult = DI::httpClient()->head($url, [HttpClientOptions::ACCEPT_CONTENT => $accept]);