mirror of
https://github.com/friendica/friendica
synced 2024-12-22 12:40:15 +00:00
Fix errors in Util namespace
This commit is contained in:
parent
780bfe0cbe
commit
7abdc17711
7 changed files with 13 additions and 15 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Friendica\Object\EMail;
|
||||
|
||||
use Friendica\Util\Emailer;
|
||||
use JsonSerializable;
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,8 +19,8 @@ class BasePath
|
|||
private $server;
|
||||
|
||||
/**
|
||||
* @param string|null $baseDir The default base path
|
||||
* @param array $server server arguments
|
||||
* @param string $baseDir The default base path
|
||||
* @param array $server server arguments
|
||||
*/
|
||||
public function __construct(string $baseDir, array $server = [])
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Friendica\Util;
|
||||
|
||||
use Friendica\App;
|
||||
use Friendica\App\BaseURL;
|
||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\L10n;
|
||||
|
@ -30,7 +30,7 @@ class Emailer
|
|||
private $pConfig;
|
||||
/** @var LoggerInterface */
|
||||
private $logger;
|
||||
/** @var App\BaseURL */
|
||||
/** @var BaseURL */
|
||||
private $baseUrl;
|
||||
/** @var L10n */
|
||||
private $l10n;
|
||||
|
@ -40,7 +40,7 @@ class Emailer
|
|||
/** @var string */
|
||||
private $siteEmailName;
|
||||
|
||||
public function __construct(IManageConfigValues $config, IManagePersonalConfigValues $pConfig, App\BaseURL $baseURL, LoggerInterface $logger,
|
||||
public function __construct(IManageConfigValues $config, IManagePersonalConfigValues $pConfig, BaseURL $baseURL, LoggerInterface $logger,
|
||||
L10n $defaultLang)
|
||||
{
|
||||
$this->config = $config;
|
||||
|
@ -116,7 +116,7 @@ class Emailer
|
|||
{
|
||||
Hook::callAll('emailer_send_prepare', $email);
|
||||
|
||||
if (empty($email)) {
|
||||
if (! $email instanceof IEmail) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -520,7 +520,6 @@ class HTTPSignature
|
|||
*
|
||||
* @param string $request request url
|
||||
* @param integer $uid User id of the requester
|
||||
* @param boolean $binary TRUE if asked to return binary results (file download) (default is "false")
|
||||
* @param array $opts (optional parameters) associative array with:
|
||||
* 'accept_content' => supply Accept: header with 'accept_content' as the value
|
||||
* 'timeout' => int Timeout in seconds, default system config value or 60 seconds
|
||||
|
|
|
@ -189,9 +189,9 @@ class Images
|
|||
* Fetch image mimetype from the image data or guessing from the file name
|
||||
*
|
||||
* @param string $image_data Image data
|
||||
* @param string $filename File name (for guessing the type via the extension)
|
||||
* @param string $default Default MIME type
|
||||
*
|
||||
* @return string MIME type
|
||||
*
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getMimeTypeByData(string $image_data): string
|
||||
|
|
|
@ -119,7 +119,7 @@ class LDSignature
|
|||
/**
|
||||
* Hashes normalized object
|
||||
*
|
||||
* @param ??? $obj
|
||||
* @param array $obj
|
||||
* @return string SHA256 hash
|
||||
*/
|
||||
private static function hash($obj): string
|
||||
|
|
|
@ -122,9 +122,9 @@ class XML
|
|||
/**
|
||||
* Copies an XML object
|
||||
*
|
||||
* @param object|string $source The XML source
|
||||
* @param object $target The XML target
|
||||
* @param string $elementname Name of the XML element of the target
|
||||
* @param object $source The XML source
|
||||
* @param object $target The XML target
|
||||
* @param string $elementname Name of the XML element of the target
|
||||
* @return void
|
||||
*/
|
||||
public static function copy(&$source, &$target, $elementname)
|
||||
|
@ -476,7 +476,7 @@ class XML
|
|||
* @param DOMXPath $xpath XPath object
|
||||
* @param string $element Element name
|
||||
* @param DOMNode $context Context object or NULL
|
||||
* @return ???|bool First element's attributes field or false on failure
|
||||
* @return mixed|bool First element's attributes field or false on failure
|
||||
*/
|
||||
public static function getFirstAttributes(DOMXPath $xpath, string $element, DOMNode $context = null)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue