mirror of
https://github.com/friendica/friendica
synced 2024-12-22 18:00:16 +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;
|
namespace Friendica\Object\EMail;
|
||||||
|
|
||||||
use Friendica\Util\Emailer;
|
|
||||||
use JsonSerializable;
|
use JsonSerializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -19,8 +19,8 @@ class BasePath
|
||||||
private $server;
|
private $server;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string|null $baseDir The default base path
|
* @param string $baseDir The default base path
|
||||||
* @param array $server server arguments
|
* @param array $server server arguments
|
||||||
*/
|
*/
|
||||||
public function __construct(string $baseDir, array $server = [])
|
public function __construct(string $baseDir, array $server = [])
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
namespace Friendica\Util;
|
namespace Friendica\Util;
|
||||||
|
|
||||||
use Friendica\App;
|
use Friendica\App\BaseURL;
|
||||||
use Friendica\Core\Config\Capability\IManageConfigValues;
|
use Friendica\Core\Config\Capability\IManageConfigValues;
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -30,7 +30,7 @@ class Emailer
|
||||||
private $pConfig;
|
private $pConfig;
|
||||||
/** @var LoggerInterface */
|
/** @var LoggerInterface */
|
||||||
private $logger;
|
private $logger;
|
||||||
/** @var App\BaseURL */
|
/** @var BaseURL */
|
||||||
private $baseUrl;
|
private $baseUrl;
|
||||||
/** @var L10n */
|
/** @var L10n */
|
||||||
private $l10n;
|
private $l10n;
|
||||||
|
@ -40,7 +40,7 @@ class Emailer
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $siteEmailName;
|
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)
|
L10n $defaultLang)
|
||||||
{
|
{
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
|
@ -116,7 +116,7 @@ class Emailer
|
||||||
{
|
{
|
||||||
Hook::callAll('emailer_send_prepare', $email);
|
Hook::callAll('emailer_send_prepare', $email);
|
||||||
|
|
||||||
if (empty($email)) {
|
if (! $email instanceof IEmail) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -520,7 +520,6 @@ class HTTPSignature
|
||||||
*
|
*
|
||||||
* @param string $request request url
|
* @param string $request request url
|
||||||
* @param integer $uid User id of the requester
|
* @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:
|
* @param array $opts (optional parameters) associative array with:
|
||||||
* 'accept_content' => supply Accept: header with 'accept_content' as the value
|
* 'accept_content' => supply Accept: header with 'accept_content' as the value
|
||||||
* 'timeout' => int Timeout in seconds, default system config value or 60 seconds
|
* '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
|
* Fetch image mimetype from the image data or guessing from the file name
|
||||||
*
|
*
|
||||||
* @param string $image_data Image data
|
* @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
|
* @return string MIME type
|
||||||
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function getMimeTypeByData(string $image_data): string
|
public static function getMimeTypeByData(string $image_data): string
|
||||||
|
|
|
@ -119,7 +119,7 @@ class LDSignature
|
||||||
/**
|
/**
|
||||||
* Hashes normalized object
|
* Hashes normalized object
|
||||||
*
|
*
|
||||||
* @param ??? $obj
|
* @param array $obj
|
||||||
* @return string SHA256 hash
|
* @return string SHA256 hash
|
||||||
*/
|
*/
|
||||||
private static function hash($obj): string
|
private static function hash($obj): string
|
||||||
|
|
|
@ -122,9 +122,9 @@ class XML
|
||||||
/**
|
/**
|
||||||
* Copies an XML object
|
* Copies an XML object
|
||||||
*
|
*
|
||||||
* @param object|string $source The XML source
|
* @param object $source The XML source
|
||||||
* @param object $target The XML target
|
* @param object $target The XML target
|
||||||
* @param string $elementname Name of the XML element of the target
|
* @param string $elementname Name of the XML element of the target
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function copy(&$source, &$target, $elementname)
|
public static function copy(&$source, &$target, $elementname)
|
||||||
|
@ -476,7 +476,7 @@ class XML
|
||||||
* @param DOMXPath $xpath XPath object
|
* @param DOMXPath $xpath XPath object
|
||||||
* @param string $element Element name
|
* @param string $element Element name
|
||||||
* @param DOMNode $context Context object or NULL
|
* @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)
|
public static function getFirstAttributes(DOMXPath $xpath, string $element, DOMNode $context = null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue