Changes:
- added type-hints - added returned type-hints in interface (I checked all)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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 = [
|
||||
|
||||
|
||||
@@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user