Skip to content

Commit

Permalink
Updated Infection config (report and badge)
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslavche committed Mar 2, 2024
1 parent 75890ef commit 02b8c3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![PHP build](https://github.com/yaroslavche/BitMask/actions/workflows/php.yml/badge.svg)](https://github.com/yaroslavche/BitMask/actions/workflows/php.yml)
[![codecov](https://codecov.io/gh/yaroslavche/bitmask/branch/main/graph/badge.svg)](https://codecov.io/gh/yaroslavche/bitmask)
[![Infection MSI](https://badge.stryker-mutator.io/github.com/yaroslavche/BitMask/main)](https://infection.github.io)
[![Infection MSI](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fyaroslavche%2FBitMask%2Fmain)](https://dashboard.stryker-mutator.io/reports/github.com/yaroslavche/BitMask/main)
[![PHP](http://poser.pugx.org/yaroslavche/bitmask/require/php)](https://packagist.org/packages/yaroslavche/bitmask)
# BitMask

Expand Down Expand Up @@ -58,10 +58,12 @@ $bitmask->set(Unknown::Case); // throws an exception, only Permissions cases ava
Exists [Bits](/src/Util/Bits.php) helper with static methods:

```php
use BitMask\Util\Bits;

$mask = 7; // 1 << 0 | 1 << 1 | 1 << 2
$integerMostSignificantBit = Bits::getMostSignificantBit($mask); // int 2
$arraySetBits = Bits::getSetBits($mask); // array:3 [1, 2, 4]
$arraySetBitsIndexes = Bits::getSetBitsIndexes($mask); // array:3 [0, 1, 2]
$arraySetBits = Bits::getSetBits($mask); // array:3 [1, 2, 4]
$string = Bits::toString($mask); // string "111"
$integerBit = Bits::indexToBit(16); // int 65536
$integerIndex = Bits::bitToIndex(65536); // int 16
Expand Down
2 changes: 1 addition & 1 deletion infection.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"debug": "build/infection/debug.log",
"perMutator": "build/infection/perMutator.md",
"stryker": {
"badge": "main"
"report": "main"
}
},
"mutators": {
Expand Down

0 comments on commit 02b8c3d

Please sign in to comment.