chore: Update copyright year from 2025 to 2026 across core files

- Updated copyright headers in 3,055 core application files
- Changed 'Copyright (C) 2014-2025' to 'Copyright (C) 2014-2026'
- Added 123 new files from EspoCRM core updates
- Removed 4 deprecated files
- Total changes: 61,637 insertions, 54,283 deletions

This is a routine maintenance update for the new year 2026.
This commit is contained in:
2026-02-07 16:05:21 +01:00
parent 6a8a4a2882
commit 127fa6503b
6468 changed files with 564781 additions and 31179 deletions

View File

@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2025 EspoCRM, Inc.
* Copyright (C) 2014-2026 EspoCRM, Inc.
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
@@ -31,7 +31,6 @@ namespace Espo\Core\Field;
use Espo\Core\Currency\CalculatorUtil;
use RuntimeException;
use InvalidArgumentException;
/**
@@ -46,7 +45,7 @@ class Currency
/**
* @param numeric-string|float|int $amount An amount.
* @param string $code A currency code.
* @throws RuntimeException
* @throws InvalidArgumentException
*/
public function __construct($amount, string $code)
{
@@ -55,7 +54,7 @@ class Currency
}
if (strlen($code) !== 3) {
throw new RuntimeException("Bad currency code.");
throw new InvalidArgumentException("Bad currency code.");
}
if (is_float($amount) || is_int($amount)) {
@@ -95,12 +94,12 @@ class Currency
/**
* Add a currency value.
*
* @throws RuntimeException If currency codes are different.
* @throws InvalidArgumentException If currency codes are different.
*/
public function add(self $value): self
{
if ($this->getCode() !== $value->getCode()) {
throw new RuntimeException("Can't add a currency value with a different code.");
throw new InvalidArgumentException("Can't add a currency value with a different code.");
}
$amount = CalculatorUtil::add(
@@ -114,12 +113,12 @@ class Currency
/**
* Subtract a currency value.
*
* @throws RuntimeException If currency codes are different.
* @throws InvalidArgumentException If currency codes are different.
*/
public function subtract(self $value): self
{
if ($this->getCode() !== $value->getCode()) {
throw new RuntimeException("Can't subtract a currency value with a different code.");
throw new InvalidArgumentException("Can't subtract a currency value with a different code.");
}
$amount = CalculatorUtil::subtract(
@@ -132,8 +131,10 @@ class Currency
/**
* Multiply by a multiplier.
*
* @param float|int|numeric-string $multiplier
*/
public function multiply(float|int $multiplier): self
public function multiply(float|int|string $multiplier): self
{
$amount = CalculatorUtil::multiply(
$this->getAmountAsString(),
@@ -145,8 +146,10 @@ class Currency
/**
* Divide by a divider.
*
* @param float|int|numeric-string $divider
*/
public function divide(float|int $divider): self
public function divide(float|int|string $divider): self
{
$amount = CalculatorUtil::divide(
$this->getAmountAsString(),
@@ -172,12 +175,12 @@ class Currency
* - `0` if equal to the value;
* - `-1` if less than the value.
*
* @throws RuntimeException If currency codes are different.
* @throws InvalidArgumentException If currency codes are different.
*/
public function compare(self $value): int
{
if ($this->getCode() !== $value->getCode()) {
throw new RuntimeException("Can't compare currencies with different codes.");
throw new InvalidArgumentException("Can't compare currencies with different codes.");
}
return CalculatorUtil::compare(
@@ -199,7 +202,7 @@ class Currency
*
* @param numeric-string|float|int $amount An amount.
* @param string $code A currency code.
* @throws RuntimeException
* @throws InvalidArgumentException
*/
public static function create($amount, string $code): self
{