mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Solve PHP 8.1 issues:
* Implicit conversion from float to int loses precision * JsonSerializable::jsonSerialize(): mixed
This commit is contained in:
parent
d997a2b679
commit
e601604362
19 changed files with 19 additions and 3 deletions
|
|
@ -74,6 +74,7 @@ abstract class Collection extends \ArrayObject implements \JsonSerializable
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
$aNames = \explode('\\', \get_class($this));
|
$aNames = \explode('\\', \get_class($this));
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class ACL implements \JsonSerializable
|
||||||
return \in_array($right, $this->rights);
|
return \in_array($right, $this->rights);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->rights;
|
return $this->rights;
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,7 @@ class Attachment implements \JsonSerializable
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ class Folder implements \JsonSerializable
|
||||||
return $this->oImapFolder->GetMetadata($sName);
|
return $this->oImapFolder->GetMetadata($sName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -625,6 +625,7 @@ class Message implements \JsonSerializable
|
||||||
return $oMessage;
|
return $oMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ class MessageCollection extends \MailSo\Base\Collection
|
||||||
throw new \BadMethodCallException('disallowed');
|
throw new \BadMethodCallException('disallowed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array_merge(parent::jsonSerialize(), array(
|
return array_merge(parent::jsonSerialize(), array(
|
||||||
|
|
|
||||||
|
|
@ -254,6 +254,7 @@ class Email implements \JsonSerializable
|
||||||
return \trim($sReturn);
|
return \trim($sReturn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ abstract class AbstractConfig implements \JsonSerializable
|
||||||
return \is_array($this->aData) && \count($this->aData);
|
return \is_array($this->aData) && \count($this->aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return $this->aData;
|
return $this->aData;
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,7 @@ abstract class Account implements \JsonSerializable
|
||||||
$this->sProxyAuthPassword = $sProxyAuthPassword;
|
$this->sProxyAuthPassword = $sProxyAuthPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -400,6 +400,7 @@ class Domain implements \JsonSerializable
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ class Identity implements \JsonSerializable
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ class Property implements \JsonSerializable
|
||||||
return $this->sPlaceholder;
|
return $this->sPlaceholder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ class PropertyCollection extends \ArrayObject implements \JsonSerializable
|
||||||
$this->sLabel = $sLabel;
|
$this->sLabel = $sLabel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -588,6 +588,7 @@ class Contact implements \JsonSerializable
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
$properties = array();
|
$properties = array();
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ class Property implements \JsonSerializable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
// Simple hack
|
// Simple hack
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ class Tag implements \JsonSerializable
|
||||||
$this->ReadOnly = false;
|
$this->ReadOnly = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -204,6 +204,7 @@ class Filter implements \JsonSerializable
|
||||||
return !empty($this->aConditions);
|
return !empty($this->aConditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ class FilterCondition implements \JsonSerializable
|
||||||
return $aResult;
|
return $aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[\ReturnTypeWillChange]
|
||||||
public function jsonSerialize()
|
public function jsonSerialize()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
|
|
||||||
|
|
@ -654,10 +654,8 @@ abstract class QRUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$ratio = \abs(100 * $darkCount / $moduleCount / $moduleCount - 50) / 5;
|
|
||||||
$lostPoint += $ratio * 10;
|
|
||||||
|
|
||||||
return $lostPoint;
|
return $lostPoint + \intval(\abs(100 * $darkCount / $moduleCount / $moduleCount - 50) * 10 / 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function getBCHTypeInfo($data)
|
static function getBCHTypeInfo($data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue