composeer update
This commit is contained in:
1
vendor/phpunit/php-timer/.github/FUNDING.yml
vendored
Normal file
1
vendor/phpunit/php-timer/.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
patreon: s_bergmann
|
||||
2
vendor/phpunit/php-timer/.travis.yml
vendored
2
vendor/phpunit/php-timer/.travis.yml
vendored
@@ -6,8 +6,6 @@ php:
|
||||
- 7.3
|
||||
- 7.4snapshot
|
||||
|
||||
sudo: false
|
||||
|
||||
before_install:
|
||||
- composer self-update
|
||||
- composer clear-cache
|
||||
|
||||
7
vendor/phpunit/php-timer/ChangeLog.md
vendored
7
vendor/phpunit/php-timer/ChangeLog.md
vendored
@@ -2,6 +2,12 @@
|
||||
|
||||
All notable changes are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
|
||||
|
||||
## [2.1.2] - 2019-06-07
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fixed [#21](https://github.com/sebastianbergmann/php-timer/pull/3352): Formatting of memory consumption does not work on 32bit systems
|
||||
|
||||
## [2.1.1] - 2019-02-20
|
||||
|
||||
### Changed
|
||||
@@ -24,6 +30,7 @@ All notable changes are documented in this file using the [Keep a CHANGELOG](htt
|
||||
|
||||
* This component is no longer supported on PHP 5.3, PHP 5.4, PHP 5.5, PHP 5.6, and PHP 7.0
|
||||
|
||||
[2.1.2]: https://github.com/sebastianbergmann/diff/compare/2.1.1...2.1.2
|
||||
[2.1.1]: https://github.com/sebastianbergmann/diff/compare/2.1.0...2.1.1
|
||||
[2.1.0]: https://github.com/sebastianbergmann/diff/compare/2.0.0...2.1.0
|
||||
[2.0.0]: https://github.com/sebastianbergmann/diff/compare/1.0.9...2.0.0
|
||||
|
||||
8
vendor/phpunit/php-timer/src/Timer.php
vendored
8
vendor/phpunit/php-timer/src/Timer.php
vendored
@@ -44,17 +44,15 @@ final class Timer
|
||||
return \microtime(true) - \array_pop(self::$startTimes);
|
||||
}
|
||||
|
||||
public static function bytesToString(int $bytes): string
|
||||
public static function bytesToString(float $bytes): string
|
||||
{
|
||||
foreach (self::$sizes as $unit => $value) {
|
||||
if ($bytes >= $value) {
|
||||
$size = \sprintf('%.2f', $bytes >= 1024 ? $bytes / $value : $bytes);
|
||||
|
||||
return $size . ' ' . $unit;
|
||||
return \sprintf('%.2f %s', $bytes >= 1024 ? $bytes / $value : $bytes, $unit);
|
||||
}
|
||||
}
|
||||
|
||||
return $bytes . ' byte' . ($bytes !== 1 ? 's' : '');
|
||||
return $bytes . ' byte' . ((int) $bytes !== 1 ? 's' : '');
|
||||
}
|
||||
|
||||
public static function secondsToTimeString(float $time): string
|
||||
|
||||
2
vendor/phpunit/php-timer/tests/TimerTest.php
vendored
2
vendor/phpunit/php-timer/tests/TimerTest.php
vendored
@@ -112,7 +112,7 @@ final class TimerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider bytesProvider
|
||||
*/
|
||||
public function testCanFormatBytesAsString(string $string, int $bytes): void
|
||||
public function testCanFormatBytesAsString(string $string, float $bytes): void
|
||||
{
|
||||
$this->assertEquals($string, Timer::bytesToString($bytes));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user