embedded-php/core

View on GitHub

Showing 4 of 18 total issues

Method __construct has 12 arguments (exceeds 4 allowed). Consider refactoring.
Open

GpioInterface $gpio,
int $busId = 0,
int $chipSelect = 0,
int $mode = 3,
int $bits = 8,
Severity: Major
Found in src/Protocol/Serial/Spi/PhpSpiExt.php - About 1 hr to fix

    Method __construct has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    public function __construct(
    GpioInterface $gpio,
    int $busId = 0,
    int $chipSelect = 0,
    int $mode = 3,
    Severity: Minor
    Found in src/Protocol/Serial/Spi/PhpSpiExt.php - About 1 hr to fix

      Method __construct has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      GpioInterface $gpio,
      int $pinSCLK,
      int $pinSDA,
      int $pinCE,
      int $pinDC,
      Severity: Major
      Found in src/Protocol/Serial/Spi/BitBang.php - About 1 hr to fix

        Function sendBytes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        protected function sendBytes(int ...$bytes): void {
        if ($this->pinCE > 0) {
        $this->gpio->setLow($this->pinCE);
        }
         
         
        Severity: Minor
        Found in src/Protocol/Serial/Spi/BitBang.php - About 55 mins to fix
        Severity
        Category
        Status
        Source
        Language