APO-Epsilon/apo-website

View on GitHub
snakes.php

Summary

Maintainability
A
0 mins
Test Coverage

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

    <p id="info2">Game Over</p>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    });
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        ctx = canvas.getContext("2d"),
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    var msgsSelf = [];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsSelf[3] = "Do you have Autophagia?";    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        snake = [];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                for(var i = 0; i < snake.length; i++) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <p id="info">by <a target="_blank" rel="nofollow" href="http://twitter.com/SolitaryDesigns"> Nick</a></p>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    //Custom funny gameover messages
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[0] = "Guess you aren't as good as Nick";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        tail.y = head_y;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                gameover();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            for(var j = 1; j < snake.length; j++) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                    if(over == 0) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        over = 0;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(hitType == "wall") {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        foodMusic = document.getElementById("food"), 
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    loading.style.top = "100%";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsSelf[0] = "There's plenty of food. Don't eat yourself.";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        ctx.fillRect(0, 0, w, h);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var s = snake[i];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            over++
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        if(head_x == f.x && head_y == f.y ||
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            snake.unshift(tail);    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(speed <= 45) speed ++;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        updateSnake();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        game_loop = setInterval(draw, 1000/speed);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //Show the messages
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            reMenu.style.zIndex = "1";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    file.addEventListener("loadeddata", function() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        w = window.innerWidth,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsSelf[1] = "Is your body tastier than the food?";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    function paintCanvas() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillStyle = "white";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    //Initialize the snake
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    function updateSnake() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Move snake
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(over == 0) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                        hitType = "self";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        dir = "right";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    var file = files[i];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    reMenu.style.zIndex = "-1"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            dir,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsSelf[2] = "AArrgghhh!! I bit myself!!";    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        this.y = Math.round(Math.random() * (h - size) / size);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    function initSnake() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            else if(key == 38 && dir != "down") setTimeout(function() {dir = "up"; }, 30);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            else if(key == 40 && dir != "up") setTimeout(function() {dir = "down"; }, 30);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

         
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                        gameover(); 
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        f.draw();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        speed = 30;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //Get the gameover text
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/food.mp3" type="audio/mp3" />
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

           head_x == y.x && head_y == y.y ) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            clearInterval(game_loop);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        initSnake();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        f = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                goText.innerHTML = msgsWall[Math.floor(Math.random() * msgsWall.length)];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            else if(hitType == "self") {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[4] = "Did you mean to lose terribly? :,)";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        this.x = Math.round(Math.random() * (w - size) / size);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillRect(s.x*size, s.y*size, size, size);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            j = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var tail = {x: head_x, y:head_y};
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            scoreText.innerHTML = "Score: "+score;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Draw food
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            goMusic.play();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    reset();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/main.ogg" type="audio/ogg"/>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/go.mp3" type="audio/mp3" />
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/go.ogg" type="audio/ogg"/>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        goMusic = document.getElementById("gameOver");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        h = window.innerHeight;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[7] = "Shreck is love, Shreck is life -shreck"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    var Food = function(){
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        var length = 10;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillRect(s.x*size, s.y*size, size, size);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                hitType = "wall";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <a href="#" id="tweet" target="_blank" rel="nofollow">Tweet My Score</a> 
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            f = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            } 
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[8] = "Sammi Strangge Smells XD"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        ctx.fillStyle = "black";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var s = snake[i];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Get the directions
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        document.onkeydown = function(e) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(dir == "right") head_x++;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        else if(dir == "up") head_y--;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        if(head_x >= w/size || head_x <= -1 || head_y >= h/size || head_y <= -1) {                    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        mainMusic.currentTime = 0;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            tweet.href='http://twitter.com/share?url=http://bit.ly/SnakeHTML5&text=I scored ' +score+ ' points in the classic HTML5 Snake game&count=horiztonal&via=cssdeck';
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    menu = document.getElementById("menu");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    scoreText = document.getElementById("score");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    menu.style.zIndex = "-1";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            speed = 90,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[2] = "There's no way to escape the Nick...";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    function paintSnake() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //console.log(key);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //Directions
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        else if(dir == "down") head_y++;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            score += 100;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            foodMusic.pause();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            game_loop = setInterval(draw, 1000/speed);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        y.draw();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    reset = function() {
Severity: Minor
Found in snakes.php by phpcodesniffer

Line exceeds 120 characters; contains 173 characters
Open

            tweet.href='http://twitter.com/share?url=http://bit.ly/SnakeHTML5&text=I scored ' +score+ ' points in the classic HTML5 Snake game&count=horiztonal&via=cssdeck';
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/main.mp3" type="audio/mp3" />
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        loading = document.getElementById("loading");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        loading.innerHTML = "Loading " + percent + "%";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        for(var i = 0; i < snake.length; i++) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            else if(key == 39 && dir != "left") setTimeout(function() {dir = "right"; }, 30);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        var tail = snake.pop();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Wall Collision
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            foodMusic.play();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //Check collision between snake parts
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <a href="javascript: void(0)" id="restart" onclick="reset()" >Restart</a>     
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        counter++;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        var percent = Math.floor((counter/files.length)*100);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    var msgsWall = [];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[1] = "Nick is stronger than he seems!";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        this.draw = function() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Update the position of the snake
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        var head_x = snake[0].x;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        else if(dir == "left") head_x--;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        else {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                    over++;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        if(typeof game_loop != "undefined")  clearInterval(game_loop); 
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        function gameover() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var tweet = document.getElementById("tweet");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                goText.innerHTML = msgsSelf[Math.floor(Math.random() * msgsSelf.length)];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <h1 id="snake">Snake</h1>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[5] = "#DuggarsWereHur"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillRect(this.x*size, this.y*size, size, size);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        for(var i = length - 1; i >= 0; i--) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            coll = 1;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            y = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        reMenu.style.zIndex = "-1"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        scoreText.innerHTML = "Score: "+score;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    reMenu = document.getElementById("reMenu");
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <a href="javascript: void(0)" id="start" onclick="init()" >Start</a>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <source src="http://dl.dropbox.com/u/26141789/canvas/snake/food.ogg" type="audio/ogg"/>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        if(percent == 100) showButton();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    start.style.top = "30%";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Full width and height
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    mainMusic.play();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    var snake,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[3] = "LOOK NICK! NO HEAD..!!";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            snake.push({x: i, y: 0});
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillStyle = "blue";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        paintCanvas();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            mainMusic.pause();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[9] = "Don't worry I still love you..NOT"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var y = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var f = new Food();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            ctx.fillStyle = "blue";
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(key == 37 && dir != "right") setTimeout(function() {dir = "left"; }, 30);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        tail.x = head_x;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        //Food collision
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            foodMusic.currentTime = 0;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            //Increase speed
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                if(head_x == s.x && head_y == s.y) {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    }
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    function draw() {
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        paintSnake();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <h1 id="snake2">Snake</h1>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    <p id="loading">Loading...Friendship, fellowship, and service!</p>
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            size = 10,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            game_loop,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            over = 0,
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            hitType;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    msgsWall[6] = "Kevin Wu is bae"
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var key = e.keyCode;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        snake.unshift(tail);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        score = 0;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        mainMusic.play();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        
Severity: Minor
Found in snakes.php by phpcodesniffer

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

    
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        var head_y = snake[0].y;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            if(key) e.preventDefault();
Severity: Minor
Found in snakes.php by phpcodesniffer

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

                var s = snake[j];
Severity: Minor
Found in snakes.php by phpcodesniffer

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

        return;
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            clearInterval(game_loop);
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            
Severity: Minor
Found in snakes.php by phpcodesniffer

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

            var goText = document.getElementById("info2");
Severity: Minor
Found in snakes.php by phpcodesniffer

Space before opening parenthesis of function call prohibited
Open

require_once ('session.php');
Severity: Minor
Found in snakes.php by phpcodesniffer

There are no issues that match your filters.

Category
Status