namespace Friendica\Object\EMail;
-use Friendica\Util\Emailer;
use JsonSerializable;
/**
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 = [])
{
namespace Friendica\Util;
-use Friendica\App;
+use Friendica\App\BaseURL;
use Friendica\Core\Config\Capability\IManageConfigValues;
use Friendica\Core\Hook;
use Friendica\Core\L10n;
private $pConfig;
/** @var LoggerInterface */
private $logger;
- /** @var App\BaseURL */
+ /** @var BaseURL */
private $baseUrl;
/** @var L10n */
private $l10n;
/** @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;
{
Hook::callAll('emailer_send_prepare', $email);
- if (empty($email)) {
+ if (! $email instanceof IEmail) {
return true;
}
*
* @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
* 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
/**
* Hashes normalized object
*
- * @param ??? $obj
+ * @param array $obj
* @return string SHA256 hash
*/
private static function hash($obj): string
/**
* 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)
* @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)
{