Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
otphp
Commits
eb144426
Unverified
Commit
eb144426
authored
6 years ago
by
Spomky
Committed by
GitHub
6 years ago
Browse files
Options
Download
Patches
Plain Diff
Apply fixes from StyleCI (#112)
[ci skip] [skip ci]
parent
125af3b7
8.3.x
v8.3.3
No related merge requests found
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
src/Factory.php
+1
-1
src/Factory.php
src/HOTP.php
+2
-2
src/HOTP.php
src/HOTPInterface.php
+1
-1
src/HOTPInterface.php
src/OTP.php
+1
-1
src/OTP.php
src/OTPInterface.php
+1
-1
src/OTPInterface.php
src/ParameterTrait.php
+1
-1
src/ParameterTrait.php
src/TOTP.php
+2
-2
src/TOTP.php
src/TOTPInterface.php
+1
-1
src/TOTPInterface.php
tests/FactoryTest.php
+1
-1
tests/FactoryTest.php
tests/HOTPTest.php
+1
-1
tests/HOTPTest.php
tests/TOTPTest.php
+1
-1
tests/TOTPTest.php
with
13 additions
and
13 deletions
+13
-13
src/Factory.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
src/HOTP.php
+
2
−
2
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
@@ -111,7 +111,7 @@ final class HOTP extends OTP implements HOTPInterface
...
@@ -111,7 +111,7 @@ final class HOTP extends OTP implements HOTPInterface
{
{
$window
=
$this
->
getWindow
(
$window
);
$window
=
$this
->
getWindow
(
$window
);
for
(
$i
=
$counter
;
$i
<=
$counter
+
$window
;
++
$i
)
{
for
(
$i
=
$counter
;
$i
<=
$counter
+
$window
;
$i
++
)
{
if
(
$this
->
compareOTP
(
$this
->
at
(
$i
),
$otp
))
{
if
(
$this
->
compareOTP
(
$this
->
at
(
$i
),
$otp
))
{
$this
->
updateCounter
(
$i
+
1
);
$this
->
updateCounter
(
$i
+
1
);
...
...
This diff is collapsed.
Click to expand it.
src/HOTPInterface.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
src/OTP.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
src/OTPInterface.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
src/ParameterTrait.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
src/TOTP.php
+
2
−
2
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
@@ -99,7 +99,7 @@ final class TOTP extends OTP implements TOTPInterface
...
@@ -99,7 +99,7 @@ final class TOTP extends OTP implements TOTPInterface
{
{
$window
=
abs
(
$window
);
$window
=
abs
(
$window
);
for
(
$i
=
-
$window
;
$i
<=
$window
;
++
$i
)
{
for
(
$i
=
-
$window
;
$i
<=
$window
;
$i
++
)
{
if
(
$this
->
compareOTP
(
$this
->
at
(
$i
*
$this
->
getPeriod
()
+
$timestamp
),
$otp
))
{
if
(
$this
->
compareOTP
(
$this
->
at
(
$i
*
$this
->
getPeriod
()
+
$timestamp
),
$otp
))
{
return
true
;
return
true
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/TOTPInterface.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
tests/FactoryTest.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
tests/HOTPTest.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
tests/TOTPTest.php
+
1
−
1
View file @
eb144426
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
/*
/*
* The MIT License (MIT)
* The MIT License (MIT)
*
*
* Copyright (c) 2014-201
7
Spomky-Labs
* Copyright (c) 2014-201
8
Spomky-Labs
*
*
* This software may be modified and distributed under the terms
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
* of the MIT license. See the LICENSE file for details.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets