Completed
Push — master ( 85f4e1...8900cc )
by Ankit
02:21
created
source/Session.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -5,6 +5,9 @@
 block discarded – undo
5 5
 
6 6
 class Session{
7 7
 
8
+    /**
9
+     * @param string $key
10
+     */
8 11
     public static function put($key, $value){
9 12
         $_SESSION[$key] = $value;
10 13
     }
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -5,15 +5,15 @@
 block discarded – undo
5 5
 
6 6
 class Session{
7 7
 
8
-    public static function put($key, $value){
9
-        $_SESSION[$key] = $value;
10
-    }
8
+	public static function put($key, $value){
9
+		$_SESSION[$key] = $value;
10
+	}
11 11
 
12
-    public static function get($key){
13
-        return (isset($_SESSION[$key]) ? $_SESSION[$key] : null);
14
-    }
12
+	public static function get($key){
13
+		return (isset($_SESSION[$key]) ? $_SESSION[$key] : null);
14
+	}
15 15
 
16
-    public static function forget($key){
17
-        unset($_SESSION[$key]);
18
-    }
16
+	public static function forget($key){
17
+		unset($_SESSION[$key]);
18
+	}
19 19
 }
Please login to merge, or discard this patch.
source/Validate.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -11,6 +11,9 @@  discard block
 block discarded – undo
11 11
 		$this->connect = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
12 12
 	}
13 13
 
14
+	/**
15
+	 * @param string $email
16
+	 */
14 17
 	function validateEmailInDb($email)
15 18
 	{
16 19
 		$query = "SELECT login_id FROM login WHERE email = '$email'";
@@ -24,6 +27,9 @@  discard block
 block discarded – undo
24 27
 		}
25 28
 	}
26 29
 
30
+	/**
31
+	 * @param string $username
32
+	 */
27 33
 	function validateUsernameInDb($username)
28 34
 	{
29 35
 		$query = "SELECT login_id FROM login WHERE username = '$username'";
Please login to merge, or discard this patch.
config/database.example.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,15 +8,15 @@
 block discarded – undo
8 8
 
9 9
    function URL()
10 10
   {
11
-    $http = "http://";
12
-    @$host = $_SERVER['SERVER_NAME'];
13
-    @$port = $_SERVER['SERVER_PORT'];
14
-    $fol = "";
15
-    if(@$_SERVER['SERVER_ADDR']!=NULL)
16
-    {
17
-        $fol = "/".explode('/', $_SERVER['PHP_SELF'])[1];
18
-    }
19
-    $url = $http.$host.":".$port.$fol;
20
-    return $url;
11
+	$http = "http://";
12
+	@$host = $_SERVER['SERVER_NAME'];
13
+	@$port = $_SERVER['SERVER_PORT'];
14
+	$fol = "";
15
+	if(@$_SERVER['SERVER_ADDR']!=NULL)
16
+	{
17
+		$fol = "/".explode('/', $_SERVER['PHP_SELF'])[1];
18
+	}
19
+	$url = $http.$host.":".$port.$fol;
20
+	return $url;
21 21
   }
22 22
 ?>
Please login to merge, or discard this patch.
index.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 session_start();
3 3
 if(isset($_SESSION['start']))
4 4
 {
5
-    header("Location: account.php");
5
+	header("Location: account.php");
6 6
 }
7 7
 ?>
8 8
   <!Doctype html>
Please login to merge, or discard this patch.