Completed
Push — master ( d8bb10...5083b1 )
by Ankit
02:09
created
logout.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 namespace AnkitJain\RegistrationModule;
4
-require (dirname(__DIR__) . '/registration-module/vendor/autoload.php');
4
+require (dirname(__DIR__).'/registration-module/vendor/autoload.php');
5 5
 use AnkitJain\RegistrationModule\Session;
6 6
 
7
-if(Session::get('start') != null)
7
+if (Session::get('start') != null)
8 8
 {
9 9
 	Session::forget('start');
10 10
 	header('Location: index.php');
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 session_start();
3
-if(isset($_SESSION['start']))
3
+if (isset($_SESSION['start']))
4 4
 {
5 5
     header("Location: account.php");
6 6
 }
Please login to merge, or discard this patch.
ajax/validate_login.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 namespace AnkitJain\RegistrationModule;
4
-require (dirname(__DIR__) . '/vendor/autoload.php');
4
+require (dirname(__DIR__).'/vendor/autoload.php');
5 5
 use AnkitJain\RegistrationModule\Login;
6 6
 @session_start();
7 7
 
8
-if(isset($_POST['q']))
8
+if (isset($_POST['q']))
9 9
 {
10 10
 	$loginField = json_decode($_POST['q']);
11 11
 	$login = $loginField->login;
12 12
 	$password = $loginField->password;
13 13
 	$obLogin = new Login();
14 14
 	$result = $obLogin->authLogin($login, $password);
15
-	if(isset($result))
15
+	if (isset($result))
16 16
 		echo $result;
17 17
 	else
18 18
 		echo json_encode([]);
Please login to merge, or discard this patch.
ajax/validate_register.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 namespace AnkitJain\RegistrationModule;
4
-require (dirname(__DIR__) . '/vendor/autoload.php');
4
+require (dirname(__DIR__).'/vendor/autoload.php');
5 5
 use AnkitJain\RegistrationModule\Login;
6 6
 @session_start();
7 7
 
8
-if(isset($_POST['q']))
8
+if (isset($_POST['q']))
9 9
 {
10 10
 	$loginField = json_decode($_POST['q']);
11 11
 	$login = $loginField->login;
12 12
 	$password = $loginField->password;
13 13
 	$obLogin = new Login();
14 14
 	$result = $obLogin->authLogin($login, $password);
15
-	if(isset($result))
15
+	if (isset($result))
16 16
 		echo $result;
17 17
 	else
18 18
 		echo json_encode([]);
Please login to merge, or discard this patch.
config/database.travis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
   // Define database connection constants
3 3
   define('DB_HOST', '127.0.0.1');
4 4
   define('DB_USER', 'root');
5
-  define('DB_PASSWORD','');
5
+  define('DB_PASSWORD', '');
6 6
   define('DB_NAME', 'account');
7 7
   define('URL', 'http://127.0.0.1/openchat');
8 8
 
Please login to merge, or discard this patch.
config/database.example.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
   // Define database connection constants
3 3
   define('DB_HOST', '127.0.0.1');
4 4
   define('DB_USER', 'root');
5
-  define('DB_PASSWORD','');
5
+  define('DB_PASSWORD', '');
6 6
   define('DB_NAME', 'account');
7 7
   define('URL', 'http://127.0.0.1/openchat');
8 8
 
Please login to merge, or discard this patch.
source/Login.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  */
13 13
 namespace AnkitJain\RegistrationModule;
14 14
 use AnkitJain\RegistrationModule\Session;
15
-require_once dirname(__DIR__) . '/config/database.php';
15
+require_once dirname(__DIR__).'/config/database.php';
16 16
 
17 17
 /**
18 18
  * For Login the User
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                             Session::put('start', $loginID);
91 91
                             return json_encode(
92 92
                                 [
93
-                                "location" => URL . "/account.php"
93
+                                "location" => URL."/account.php"
94 94
                                 ]
95 95
                             );
96 96
                         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     }
100 100
                     return json_encode(
101 101
                         [
102
-                        "Error" => "You are not registered, " . $this->connect->error
102
+                        "Error" => "You are not registered, ".$this->connect->error
103 103
                         ]
104 104
                     );
105 105
                 }
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
             }
109 109
             return json_encode(
110 110
                 [
111
-                "Error" => "You are not registered, " . $this->connect->error
111
+                "Error" => "You are not registered, ".$this->connect->error
112 112
                 ]
113 113
             );
114 114
         } else {
Please login to merge, or discard this patch.
source/Validate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
  * @link     https://github.com/ankitjain28may/registration-module
12 12
  */
13 13
 namespace AnkitJain\RegistrationModule;
14
-require_once dirname(__DIR__) . '/config/database.php';
14
+require_once dirname(__DIR__).'/config/database.php';
15 15
 
16 16
 /**
17 17
  * For validation the Email and Username in DB.
Please login to merge, or discard this patch.
source/Register.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 namespace AnkitJain\RegistrationModule;
15 15
 use AnkitJain\RegistrationModule\Validate;
16 16
 use AnkitJain\RegistrationModule\Session;
17
-require_once dirname(__DIR__) . '/config/database.php';
17
+require_once dirname(__DIR__).'/config/database.php';
18 18
 
19 19
 /**
20 20
  * For Register the New User
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         if (!$this->connect->query($query)) {
99 99
             return json_encode(
100 100
                 [
101
-                "Error" => "You are not registered, " . $this->connect->error
101
+                "Error" => "You are not registered, ".$this->connect->error
102 102
                 ]
103 103
             );
104 104
         }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
             if (!$this->connect->query($query)) {
114 114
                 return json_encode(
115 115
                     [
116
-                    "Error" => "You are not registered, " . $this->connect->error
116
+                    "Error" => "You are not registered, ".$this->connect->error
117 117
                     ]
118 118
                 );
119 119
             }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             Session::put('start', $userId);
122 122
             return json_encode(
123 123
                 [
124
-                "location" => URL . "/account.php"
124
+                "location" => URL."/account.php"
125 125
                 ]
126 126
             );
127 127
         }
Please login to merge, or discard this patch.