mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°5122 - Update libs to new PHP requirements
This commit is contained in:
@@ -498,8 +498,11 @@ abstract class AbstractUnicodeString extends AbstractString
|
||||
)|[\p{Cc}\x7F]++)/xu', '', $s);
|
||||
}
|
||||
|
||||
// Non printable characters have been dropped, so wcswidth cannot logically return -1.
|
||||
$width += $this->wcswidth($s);
|
||||
$lineWidth = $this->wcswidth($s);
|
||||
|
||||
if ($lineWidth > $width) {
|
||||
$width = $lineWidth;
|
||||
}
|
||||
}
|
||||
|
||||
return $width;
|
||||
|
||||
@@ -100,7 +100,7 @@ final class FrenchInflector implements InflectorInterface
|
||||
['/^mes(sieur|seigneur)s$/', 'mon\1'],
|
||||
['/^Mes(sieur|seigneur)s$/', 'Mon\1'],
|
||||
|
||||
//Default rule
|
||||
// Default rule
|
||||
['/s$/i', ''],
|
||||
];
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ class LazyString implements \Stringable, \JsonSerializable
|
||||
*/
|
||||
final public static function isStringable($value): bool
|
||||
{
|
||||
return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : is_scalar($value));
|
||||
return \is_string($value) || $value instanceof self || (\is_object($value) ? method_exists($value, '__toString') : \is_scalar($value));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user