aperta-principium/Interclip

View on GitHub
includes/lib/functions.php

Summary

Maintainability
A
1 hr
Test Coverage

Method getOS has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getOS()
{

    global $user_agent;

Severity: Minor
Found in includes/lib/functions.php - About 1 hr to fix

    Argument 2 (subject) is ?string but \preg_match_all() takes string
    Open

        $listIds = preg_match_all('/.*=/', $osInfo, $matchListIds);
    Severity: Minor
    Found in includes/lib/functions.php by phan

    Argument 2 (subject) is ?string but \preg_match_all() takes string
    Open

        $listVal = preg_match_all('/=.*/', $osInfo, $matchListVal);
    Severity: Minor
    Found in includes/lib/functions.php by phan

    When fetching an array index from a value of type array{0:'B',1:'KB',2:'MB',3:'GB',4:'TB',5:'PB',6:'EB',7:'ZB',8:'YB'}, found an array index of type float, but expected the index to be of type int
    Open

            return sprintf('%.02F', round($bytes / pow(1024, $i), 1)) * 1 . ' ' . @$sizes[$i];
    Severity: Minor
    Found in includes/lib/functions.php by phan

    There are no issues that match your filters.

    Category
    Status