mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +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;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
$aNames = \explode('\\', \get_class($this));
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class ACL implements \JsonSerializable
|
|||
return \in_array($right, $this->rights);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->rights;
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ class Attachment implements \JsonSerializable
|
|||
return $this;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -201,6 +201,7 @@ class Folder implements \JsonSerializable
|
|||
return $this->oImapFolder->GetMetadata($sName);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -625,6 +625,7 @@ class Message implements \JsonSerializable
|
|||
return $oMessage;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ class MessageCollection extends \MailSo\Base\Collection
|
|||
throw new \BadMethodCallException('disallowed');
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array_merge(parent::jsonSerialize(), array(
|
||||
|
|
|
|||
|
|
@ -254,6 +254,7 @@ class Email implements \JsonSerializable
|
|||
return \trim($sReturn);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ abstract class AbstractConfig implements \JsonSerializable
|
|||
return \is_array($this->aData) && \count($this->aData);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return $this->aData;
|
||||
|
|
|
|||
|
|
@ -130,6 +130,7 @@ abstract class Account implements \JsonSerializable
|
|||
$this->sProxyAuthPassword = $sProxyAuthPassword;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -400,6 +400,7 @@ class Domain implements \JsonSerializable
|
|||
);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ class Identity implements \JsonSerializable
|
|||
);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ class Property implements \JsonSerializable
|
|||
return $this->sPlaceholder;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ class PropertyCollection extends \ArrayObject implements \JsonSerializable
|
|||
$this->sLabel = $sLabel;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -588,6 +588,7 @@ class Contact implements \JsonSerializable
|
|||
return true;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
$properties = array();
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ class Property implements \JsonSerializable
|
|||
}
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
// Simple hack
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ class Tag implements \JsonSerializable
|
|||
$this->ReadOnly = false;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -204,6 +204,7 @@ class Filter implements \JsonSerializable
|
|||
return !empty($this->aConditions);
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return array(
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ class FilterCondition implements \JsonSerializable
|
|||
return $aResult;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue