Completed
Branch master (605db8)
by Ashish
03:28
created
src/Http/Controllers/TwoFactorAuthenticationController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param \Illuminate\Http\Request
46 46
      *
47
-     * @return \Illuminate\Http\Response
47
+     * @return \Illuminate\Http\RedirectResponse
48 48
      */
49 49
     public function enableTwoFactorAuthentication(Request $request)
50 50
     {
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      *
84 84
      * @param int $length Length of the encoded string.
85 85
      *
86
-     * @return void
86
+     * @return string
87 87
      */
88 88
     private function base32EncodedString($length = 30):
89 89
     string
Please login to merge, or discard this patch.
src/routes/routes.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
 
3
-Route::group(['middleware' => ['web'], 'namespace' => '\Thecodework\TwoFactorAuthentication\Http\Controllers'], function () {
3
+Route::group(['middleware' => ['web'], 'namespace' => '\Thecodework\TwoFactorAuthentication\Http\Controllers'], function() {
4 4
     Route::get('verify-2fa', 'TwoFactorAuthenticationController@verifyTwoFactorAuthentication');
5 5
     Route::post('verify-2fa', 'TwoFactorAuthenticationController@verifyToken');
6 6
     Route::get('setup-2fa', 'TwoFactorAuthenticationController@setupTwoFactorAuthentication');
Please login to merge, or discard this patch.
src/AuthenticatesUsersWith2FA.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         ];
59 59
 
60 60
         // Impllicitly adding an validation rule to check if token is valid or not.
61
-        Validator::extendImplicit('valid_token', function ($attribute, $value, $parameters, $validator) {
61
+        Validator::extendImplicit('valid_token', function($attribute, $value, $parameters, $validator) {
62 62
             $totp = new TOTP(
63 63
                 config('2fa-config.account_name'),
64 64
                 $this->user->secret_key
Please login to merge, or discard this patch.
2017_03_18_000012_add_two_factor_authentication_required_fields.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::table('users', function (Blueprint $table) {
16
+        Schema::table('users', function(Blueprint $table) {
17 17
             $table->smallInteger('is_2fa_enabled')->default(0)->before('create_at');
18 18
             $table->string('secret_key')->nullable()->after('is_2fa_enabled');
19 19
         });
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function down()
28 28
     {
29
-        Schema::table('users', function (Blueprint $table) {
29
+        Schema::table('users', function(Blueprint $table) {
30 30
             $table->dropColumn('is_2fa_enabled');
31 31
             $table->dropColumn('secret_key');
32 32
         });
Please login to merge, or discard this patch.