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:
@@ -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
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
namespace Espo\Core\Field;
|
||||
|
||||
use RuntimeException;
|
||||
use InvalidArgumentException;
|
||||
|
||||
/**
|
||||
* A phone number group. Contains a list of phone numbers. One phone number is set as primary.
|
||||
@@ -43,8 +43,7 @@ class PhoneNumberGroup
|
||||
|
||||
/**
|
||||
* @param PhoneNumber[] $list
|
||||
*
|
||||
* @throws RuntimeException
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function __construct(array $list = [])
|
||||
{
|
||||
@@ -81,11 +80,8 @@ class PhoneNumberGroup
|
||||
{
|
||||
$primary = $this->getPrimary();
|
||||
|
||||
if (!$primary) {
|
||||
return null;
|
||||
}
|
||||
return $primary?->getNumber();
|
||||
|
||||
return $primary->getNumber();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,7 +165,7 @@ class PhoneNumberGroup
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether an number is in the list.
|
||||
* Whether the number is in the list.
|
||||
*/
|
||||
public function hasNumber(string $number): bool
|
||||
{
|
||||
@@ -258,6 +254,7 @@ class PhoneNumberGroup
|
||||
* Create with an optional phone number list. A first item will be set as primary.
|
||||
*
|
||||
* @param PhoneNumber[] $list
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public static function create(array $list = []): self
|
||||
{
|
||||
@@ -281,11 +278,11 @@ class PhoneNumberGroup
|
||||
|
||||
foreach ($this->list as $item) {
|
||||
if (!$item instanceof PhoneNumber) {
|
||||
throw new RuntimeException("Bad item.");
|
||||
throw new InvalidArgumentException("Bad item.");
|
||||
}
|
||||
|
||||
if (in_array($item->getNumber(), $numberList)) {
|
||||
throw new RuntimeException("Number list contains a duplicate.");
|
||||
throw new InvalidArgumentException("Number list contains a duplicate.");
|
||||
}
|
||||
|
||||
$numberList[] = strtolower($item->getNumber());
|
||||
|
||||
Reference in New Issue
Block a user