@@ -11,16 +11,10 @@ ByteFormatter formats byte values as human-readable strings. An appropriate expo
11
11
that the value never exceeds the base. For example, in base 1024, ` format(1023) ` gives * 1023 B* but ` format(1024) ` gives
12
12
* 1 KiB* instead of * 1024 B* .
13
13
14
- Requirements
15
- ------------
16
-
17
- - [ PHP 5.5] ( http://php.net/ )
18
- - [ Composer] ( https://getcomposer.org/ )
19
-
20
14
Usage
21
15
-----
22
16
23
- By default bytes are divided using ` Base::BINARY ` into multiples of 1024.
17
+ By default, bytes are divided using ` Base::BINARY ` into multiples of 1024.
24
18
25
19
``` php
26
20
(new ByteFormatter)->format(0x80000);
@@ -37,7 +31,7 @@ Bytes can be divided into multiples of 1000 by specifying `Base::DECIMAL` as the
37
31
Precision
38
32
---------
39
33
40
- By default all values are rounded to the nearest integer.
34
+ By default, all values are rounded to the nearest integer.
41
35
42
36
``` php
43
37
(new ByteFormatter)->format(0x80233);
@@ -101,15 +95,15 @@ always be in `KiB`. Consult the following table to see how exponents map to symb
101
95
102
96
| Exponent | Symbol |
103
97
| :--------:| :------:|
104
- | 0 | B |
105
- | 1 | K |
106
- | 2 | M |
107
- | 3 | G |
108
- | 4 | T |
109
- | 5 | P |
110
- | 6 | E |
111
- | 7 | Z |
112
- | 8 | Y |
98
+ | 0 | B |
99
+ | 1 | K |
100
+ | 2 | M |
101
+ | 3 | G |
102
+ | 4 | T |
103
+ | 5 | P |
104
+ | 6 | E |
105
+ | 7 | Z |
106
+ | 8 | Y |
113
107
114
108
Unit customization
115
109
------------------
@@ -199,8 +193,8 @@ in this document can be found in `DocumentationTest`.
199
193
[ Version image ] : https://poser.pugx.org/scriptfusion/byte-formatter/version " Latest version "
200
194
[ Downloads ] : https://packagist.org/packages/scriptfusion/byte-formatter
201
195
[ Downloads image ] : https://poser.pugx.org/scriptfusion/byte-formatter/downloads " Total downloads "
202
- [ Build ] : http ://travis-ci.org /ScriptFUSION/Porter
203
- [ Build image ] : https://travis-ci.org /ScriptFUSION/ByteFormatter. svg?branch=master " Build status "
196
+ [ Build ] : https ://github.com /ScriptFUSION/ByteFormatter/actions/workflows/Tests.yaml
197
+ [ Build image ] : https://github.com /ScriptFUSION/ByteFormatter/actions/workflows/Tests.yaml/badge. svg " Build status "
204
198
[ Coverage ] : https://coveralls.io/github/ScriptFUSION/ByteFormatter
205
199
[ Coverage image ] : https://coveralls.io/repos/ScriptFUSION/ByteFormatter/badge.svg " Test coverage "
206
200
[ Style ] : https://styleci.io/repos/18541340
0 commit comments