dependencies-upgrade

This commit is contained in:
RafficMohammed
2023-01-08 02:20:59 +05:30
parent 7870479b18
commit 49021a4497
1711 changed files with 74994 additions and 70803 deletions

View File

@@ -1,25 +1,20 @@
<?php
/**
* This file is part of Collision.
*
* (c) Nuno Maduro <enunomaduro@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace NunoMaduro\Collision;
use NunoMaduro\Collision\Contracts\ArgumentFormatter as ArgumentFormatterContract;
/**
* This is an Collision Argument Formatter implementation.
* @internal
*
* @author Nuno Maduro <enunomaduro@gmail.com>
* @see \Tests\Unit\ArgumentFormatterTest
*/
class ArgumentFormatter implements ArgumentFormatterContract
final class ArgumentFormatter implements ArgumentFormatterContract
{
private const MAX_STRING_LENGTH = 1000;
/**
* {@inheritdoc}
*/
@@ -30,7 +25,7 @@ class ArgumentFormatter implements ArgumentFormatterContract
foreach ($arguments as $argument) {
switch (true) {
case is_string($argument):
$result[] = '"' . $argument . '"';
$result[] = '"' . (mb_strlen($argument) > self::MAX_STRING_LENGTH ? mb_substr($argument, 0, self::MAX_STRING_LENGTH) . '...' : $argument) . '"';
break;
case is_array($argument):
$associative = array_keys($argument) !== range(0, count($argument) - 1);