eustasy/authenticatron

View on GitHub
documentation.php

Summary

Maintainability
B
6 hrs
Test Coverage

File documentation.php has 453 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

include __DIR__.'/assets/header.php';

require_once __DIR__.'/authenticatron.php';
Severity: Minor
Found in documentation.php - About 6 hrs to fix

    Line exceeds 120 characters; contains 126 characters
    Open

                        echo '<p>The required image functions don\'t seem to exist, so we\'re falling back to Google Charts.</p>';
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 121 characters
    Wontfix

            <p>This returns a simple boolean value to prevent data-leakage and zero-equivalent values from codes or keys.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 183 characters
    Open

            <p><strong>QR Code</strong> (Quick Response Code) is a type of 2D matrix barcodes with built in redundancy, commonly used to scan links into mobile phones through cameras.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 138 characters
    Open

            <p><code>$Variance</code> is an integer indicating the adjustment of codes with a 30 second value. Defaults to 2, or 1 minute.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

            <p>Outputs an OTPAuth URL that gives people their Secret along with a passed Member Name and an optional Issuer.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 124 characters
    Open

            <p><strong>Base32</strong> is an encoding, effectively an alphabet, that computers use made up of 32 characters.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 128 characters
    Open

            <p>Note the indexes, which can be used to determine the time difference, and perhaps warn users on the outer bounds.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 179 characters
    Wontfix

            <p>Outputs an array, where <code>Secret</code> is the Secret for the member, <code>URL</code> is an OTPAuth URL, and <code>QR</code> is the Data64 URI for the QR code.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 141 characters
    Wontfix

            <p><code>$Code</code> is what the user enters to authenticate. A 6 digit string, usually numeric, but not necessarily an integer.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 209 characters
    Open

            <p><strong>OATH</strong> is the short name for the <a href="https://openauthentication.org/">Initiative for Open Authentication</a>, an organisation dedicated to keeping secure authentication free.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 197 characters
    Open

            <p><strong>TOTP</strong> abbreviates Time-based One-time Password Algorithm. TOTP Algorithms generate passwords from a given secret that are only valid over a very specific time period.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 150 characters
    Open

            <p><code>$Variance</code> is an integer indicating the adjustment of codes with a 30 second value. Defaults to 2 either side, or 1 minute.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 175 characters
    Open

            <p><strong>HOTP</strong> is HMAC-based one-time password algorithm. HOTP Algorithms generate passwords from a given secret that do not expose the secret over time.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 123 characters
    Open

            <p>All parameters should be strings, with the optional issuer defaulting to the configured value if not passed.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 131 characters
    Open

            <p><code>$Secret</code> is the first result from <code>Authenticatron_Check</code>, that you securely stored for later.</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 155 characters
    Open

            <p>Returns a <code>$Length</code> long string with 32bit only Characters, or <code>false</code> on failure (usually due to a lack of security).</p>
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line exceeds 120 characters; contains 129 characters
    Open

                    echo '<p><img src="https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='.urlencode($URL).'"></p>';
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ( function_exists('openssl_random_pseudo_bytes') ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ( $MCrypt ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Usage of ELSE IF is discouraged; use ELSEIF instead
    Open

                } else if ( $OpenSSL ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if ( $Strong ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if ( function_exists('mcrypt_create_iv') ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if ( !extension_loaded('gd') || !function_exists('gd_info') ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    if ( isset($_GET['googlechart']) ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else if ( $OpenSSL ) {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 16
    Open

                    }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                }
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                if (
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    Line indented incorrectly; expected 8 spaces, found 12
    Open

                } else {
    Severity: Minor
    Found in documentation.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status