Skip to content

Commit 0004bed

Browse files
committed
fixed some minor coding styles
1 parent af186da commit 0004bed

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/EnumSet.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function key()
148148
public function next()
149149
{
150150
do {
151-
if (++ $this->ordinal >= $this->ordinalMax) {
151+
if (++$this->ordinal >= $this->ordinalMax) {
152152
$this->ordinal = $this->ordinalMax;
153153
return;
154154
}
@@ -218,8 +218,8 @@ public function getBitset()
218218
*/
219219
public function setBitset($bitset)
220220
{
221-
if (! is_string($bitset)) {
222-
throw new InvalidArgumentException("bitset must be a string");
221+
if (!is_string($bitset)) {
222+
throw new InvalidArgumentException('Bitset must be a string');
223223
}
224224

225225
$bitset = strrev($bitset);
@@ -239,9 +239,9 @@ public function setBitset($bitset)
239239
}
240240

241241
/**
242-
* get a bit at the given ordinal
242+
* Get a bit at the given ordinal number
243243
*
244-
* @param $ordinal int Number of bit to get
244+
* @param $ordinal int Ordinal number of bit to get
245245
* @return boolean
246246
*/
247247
private function getBit($ordinal)
@@ -250,10 +250,9 @@ private function getBit($ordinal)
250250
}
251251

252252
/**
253-
* set a bit at the given ordinal
253+
* Set a bit at the given ordinal number
254254
*
255-
* @param $ordinal int
256-
* number of bit to manipulate
255+
* @param $ordinal int Ordnal number of bit to set
257256
* @return void
258257
*/
259258
private function setBit($ordinal)
@@ -263,15 +262,14 @@ private function setBit($ordinal)
263262
}
264263

265264
/**
266-
* reset a bit at the given ordinal
265+
* Unset a bit at the given ordinal number
267266
*
268-
* @param $ordinal int
269-
* number of bit to set to false
267+
* @param $ordinal int Ordinal number of bit to unset
270268
* @return void
271269
*/
272270
private function unsetBit($ordinal)
273271
{
274272
$byte = (int) ($ordinal / 8);
275-
$this->bitset[$byte] = $this->bitset[$byte] & chr(~ (1 << ($ordinal % 8)));
273+
$this->bitset[$byte] = $this->bitset[$byte] & chr(~(1 << ($ordinal % 8)));
276274
}
277275
}

0 commit comments

Comments
 (0)