htdocs/index.php

Summary

Maintainability
F
3 days
Test Coverage

File index.php has 466 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

require_once 'phplib/CurlClient.php';
require_once 'phplib/Postmortem.php';
require_once 'phplib/Configuration.php';
Severity: Minor
Found in htdocs/index.php - About 7 hrs to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            case "detect_time":
                if (! isset($params["timezone"])) {
                    $app->response->status(400);
                    return;
                }
    Severity: Major
    Found in htdocs/index.php and 2 other locations - About 5 hrs to fix
    htdocs/index.php on lines 361..377
    htdocs/index.php on lines 379..395

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 193.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            case "end_time":
                if (! isset($params["timezone"])) {
                    $app->response->status(400);
                    return;
                }
    Severity: Major
    Found in htdocs/index.php and 2 other locations - About 5 hrs to fix
    htdocs/index.php on lines 361..377
    htdocs/index.php on lines 397..413

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 193.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            case "start_time":
                if (!isset($params["timezone"])) {
                    $app->response->status(400);
                    return;
                }
    Severity: Major
    Found in htdocs/index.php and 2 other locations - About 5 hrs to fix
    htdocs/index.php on lines 379..395
    htdocs/index.php on lines 397..413

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 193.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        if ($res["status"] == Postmortem::ERROR) {
            $app->response->status(400);
        } else {
            $app->response->status(201);
            $tags = Postmortem::get_tags_for_event($id);
    Severity: Major
    Found in htdocs/index.php and 2 other locations - About 1 hr to fix
    features/images/routes.php on lines 20..32
    features/links/routes.php on lines 22..34

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 120.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    $app->get('/features/:feature/css/:path' , function ($feature, $path) use ($app) {
            // read the file if it exists. Then serve it back.
            $file = stream_resolve_include_path("features/{$feature}/assets/css/{$path}");
            if (!$file) {
                $app->response->status(404);
    Severity: Major
    Found in htdocs/index.php and 1 other location - About 1 hr to fix
    htdocs/index.php on lines 532..544

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    $app->get('/features/:feature/js/:path' , function ($feature, $path) use ($app) {
            // read the file if it exists. Then serve it back.
            $file = stream_resolve_include_path("features/{$feature}/assets/js/{$path}");
            if (!$file) {
                $app->response->status(404);
    Severity: Major
    Found in htdocs/index.php and 1 other location - About 1 hr to fix
    htdocs/index.php on lines 546..558

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 113.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

    });
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->get('/events/:id/summary', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 0 spaces before closing bracket; 1 found
    Open

        if ( isset($_SESSION['timezone']) ) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->get('/events/:id', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 0 spaces before closing bracket; 1 found
    Open

        } else if ( isset($config['timezone']) ) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->delete('/events/:id', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->get('/events/:id/lock', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->post('/events/:id/history', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->delete('/events/:event_id/tags/:tag_id', function($event_id, $tag_id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Space found before comma in function call
    Open

    $app->get('/features/:feature/css/:path' , function ($feature, $path) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 0 spaces before closing bracket; 1 found
    Open

        if ($first['starttime'] == $second['starttime'] ) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->get('/events/:id/undelete', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Function closing brace must go on the next line following the body; found 1 blank lines before brace
    Open

    });
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->post('/events/:id/tags', function($id) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Space found before comma in function call
    Open

    $app->get('/features/:feature/js/:path' , function ($feature, $path) use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Terminating statement must be indented to the same level as the CASE body
    Open

                break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after FUNCTION keyword; 0 found
    Open

    $app->get('/', function() use ($app) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        include '../views/page.php';
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        $app->log->setLevel(4);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        $message = "Could not parse configuration file.";
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        die();
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        error_log("ERROR: " . $message);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        $content = "error";
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Spaces must be used to indent lines; tabs are not allowed
    Open

        $app->log->setLevel(1);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function getUserTimezone() {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 0 spaces after opening bracket; 1 found
    Open

        if ( isset($_SESSION['timezone']) ) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 0 spaces after opening bracket; 1 found
    Open

        } else if ( isset($config['timezone']) ) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function default_status_time() {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    No space found after comma in function call
    Open

            error_log(print_r($event,true));
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["tldr"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 6
    Open

          $tz = $_SESSION['timezone'];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setTimezone($timezone);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after SWITCH keyword; 0 found
    Open

            switch($key) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["summary"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "start_date":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function cmp($first, $second) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $new_date = date_parse($value);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Opening brace should be on a new line
    Open

    function getTimeString($diff) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if (!isset($params["timezone"])) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after IF keyword; 0 found
    Open

        if(isset($event['error'])) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["endtime"] = $edate->getTimeStamp();
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "tldr":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["starttime"] = $edate->getTimeStamp();
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate = new DateTime("@$detecttime");
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate = new DateTime("@$endtime");
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $statustime = $old_event["statustime"];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setTimezone($timezone);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                } elseif ($key == "detect_date") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    return;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "severity":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["incident_cause"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            if (!$file) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "why_surprised":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if (! isset($params["timezone"])) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $timezone = new DateTimeZone($params["timezone"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $new_date = date_parse($value);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $app->response->status(400);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "incident_cause":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Expected 1 space after IF keyword; 0 found
    Open

        if($status === Postmortem::EDIT_UNLOCKED) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["title"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["detecttime"] = $edate->getTimeStamp();
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $event["statustime"] = 0;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["severity"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $starttime = isset($event["starttime"]) ? $event["starttime"] : $old_event["starttime"];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setTime($new_date["hour"], $new_date["minute"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    return;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setDate($new_date["year"], $new_date["month"], $new_date["day"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $app->response->status(400);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "facilitator":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 8 spaces, found 6
    Open

          $tz = $config['timezone'];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["meeting_notes_link"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if ($key == "start_time") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "detect_time":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $timezone = new DateTimeZone($params["timezone"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $detecttime = isset($event["detecttime"]) ? $event["detecttime"] : $old_event["detecttime"];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $timezone = new DateTimeZone($params["timezone"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["facilitator"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "impact_type":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $app->response->status(400);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "status_datetime":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setDate($new_date["year"], $new_date["month"], $new_date["day"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            if (!$file) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setTime($new_date["hour"], $new_date["minute"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $new_date = date_parse($value);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setTime($new_date["hour"], $new_date["minute"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Whitespace found at end of line
    Open

        } 
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if (! isset($params["timezone"])) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "owner_team":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["why_surprised"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "gcal":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "meeting_notes_link":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "start_time":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    return;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $app->response->status(400);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setTimezone($timezone);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $timezone = new DateTimeZone($params["timezone"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    return;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if (! isset($params["timezone"])) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setDate($new_date["year"], $new_date["month"], $new_date["day"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["statustime"] = $edate->getTimeStamp();
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    break;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["impact_type"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate = new DateTime("@$statustime");
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setTime($new_date["hour"], $new_date["minute"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "end_time":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate->setTimezone($timezone);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if ($key == "detect_time") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $new_date = date_parse($value);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "problem_type":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["problem_type"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["subsystem"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "summary":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                } elseif ($key == "start_date") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if (!$value) {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "end_date":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $endtime = isset($event["endtime"]) ? $event["endtime"] : $old_event["endtime"];
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "contact":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                if ($key == "end_time") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["contact"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "detect_date":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                } elseif ($key == "end_date") {
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["owner_team"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 16 spaces, found 12
    Open

                }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $event["gcal"] = $value;
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 4 spaces, found 8
    Open

            }
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "subsystem":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected 12 spaces, found 8
    Open

            case "title":
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 16 spaces, found 12
    Open

                $edate = new DateTime("@$starttime");
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    Line indented incorrectly; expected at least 20 spaces, found 16
    Open

                    $edate->setDate($new_date["year"], $new_date["month"], $new_date["day"]);
    Severity: Minor
    Found in htdocs/index.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status