src/Oled/GrayScale/AbstractGrayScaleDisplay.php
Showing 3 of 3 total issues
Method __construct
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ProtocolInterface $protocol, int $width, int $height, int $rotate, string $colorMode,
Function renderGrayscale
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function renderGrayscale(array &$buffer, array $pixelData): void { $i = 0; foreach ($pixelData as $pixel) { // decomposition into rgb components $r = ($pixel >> 16) & 0xFF;
- Read upRead up
Function renderMono
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function renderMono(array &$buffer, array $pixelData): void { $i = 0; foreach ($pixelData as $pixel) { if ($pixel > 0) { $idx = (int)($i / 2);
- Read upRead up