<?php

declare(strict_types=1);

namespace App\Domain\QrCode\Pattern;

use App\Domain\QrCode\ValueObject\Position;

class TimingPattern implements PatternInterface
{
    public function apply(array &$matrix, int $size): void
    {
        // Horizontales Timing Pattern
        for ($i = 0; $i < $size; $i++) {
            $matrix[6][$i] = ($i % 2 === 0);
        }

        // Vertikales Timing Pattern
        for ($i = 0; $i < $size; $i++) {
            $matrix[$i][6] = ($i % 2 === 0);
        }
    }
}
