MCPcopy Create free account
hub / github.com/codemistic/Web-Development / calcParity

Method calcParity

text-to-qr/lib/phpqrcode/phpqrcode.php:1386–1399  ·  view source on GitHub ↗

----------------------------------------------------------------------

()

Source from the content-addressed store, hash-verified

1384
1385 //----------------------------------------------------------------------
1386 public function calcParity()
1387 {
1388 $parity = 0;
1389
1390 foreach($this->items as $item) {
1391 if($item->mode != QR_MODE_STRUCTURE) {
1392 for($i=$item->size-1; $i>=0; $i--) {
1393 $parity ^= $item->data[$i];
1394 }
1395 }
1396 }
1397
1398 return $parity;
1399 }
1400
1401 //----------------------------------------------------------------------
1402 public static function checkModeNum($size, $data)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected