Skip to content

Commit e0bf5d7

Browse files
committed
💄
1 parent b95ff2a commit e0bf5d7

File tree

5 files changed

+17
-16
lines changed

5 files changed

+17
-16
lines changed

.phan/config.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
// Note that the **only** effect of choosing `'5.6'` is to infer
1515
// that functions removed in php 7.0 exist.
1616
// (See `backward_compatibility_checks` for additional options)
17-
'target_php_version' => null,
18-
'minimum_target_php_version' => '8.2',
17+
'target_php_version' => null,
18+
'minimum_target_php_version' => '8.2',
1919

2020
// A list of directories that should be parsed for class and
2121
// method information. After excluding the directories
@@ -24,7 +24,7 @@
2424
//
2525
// Thus, both first-party and third-party code being used by
2626
// your application should be included in this list.
27-
'directory_list' => [
27+
'directory_list' => [
2828
'examples',
2929
'src',
3030
'tests',
@@ -35,7 +35,7 @@
3535
// exclude from parsing. Actual value will exclude every
3636
// "test", "tests", "Test" and "Tests" folders found in
3737
// "vendor/" directory.
38-
'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
38+
'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
3939

4040
// A directory list that defines files that will be excluded
4141
// from static analysis, but whose class and method
@@ -51,7 +51,7 @@
5151
'exclude_analysis_directory_list' => [
5252
'vendor/',
5353
],
54-
'suppress_issue_types' => [
54+
'suppress_issue_types' => [
5555
'PhanAccessMethodInternal',
5656
],
5757
];

examples/battlenet.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* @license MIT
99
*/
1010

11-
use chillerlan\Authenticator\{Authenticator, AuthenticatorOptions, Authenticators\BattleNet};
12-
use chillerlan\Authenticator\Authenticators\AuthenticatorInterface;
11+
use chillerlan\Authenticator\{Authenticator, AuthenticatorOptions};
12+
use chillerlan\Authenticator\Authenticators\{AuthenticatorInterface, BattleNet};
1313

1414
require_once '../vendor/autoload.php';
1515

@@ -28,12 +28,12 @@
2828
// verify the current code
2929
var_dump($auth->verify($code)); // -> true
3030
// previous code
31-
var_dump($auth->verify($code, time() - $options->period)); // -> true
31+
var_dump($auth->verify($code, (time() - $options->period))); // -> true
3232
// 2nd adjacent is invalid
33-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> false
33+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> false
3434
// allow 2 adjacent codes
3535
$options->adjacent = 2;
36-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> true
36+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> true
3737

3838
// request a new authenticator from the Battle.net API
3939
// this requires the BattleNet class to be invoked directly as we're using non-interface methods for this

examples/steam.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
// verify the current code
3030
var_dump($auth->verify($code)); // -> true
3131
// previous code
32-
var_dump($auth->verify($code, time() - $options->period)); // -> true
32+
var_dump($auth->verify($code, (time() - $options->period))); // -> true
3333
// 2nd adjacent is invalid
34-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> false
34+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> false
3535
// allow 2 adjacent codes
3636
$options->adjacent = 2;
37-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> true
37+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> true

examples/totp.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
// verify the code
3939
var_dump($auth->verify($code)); // -> true
4040
// verify against the previous time slice
41-
var_dump($auth->verify($code, time() - $options->period)); // -> true
41+
var_dump($auth->verify($code, (time() - $options->period))); // -> true
4242
// 2 steps ahead (1 is default)
43-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> false
43+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> false
4444
// set adjacent codes to 2 and try again
4545
$options->adjacent = 2;
46-
var_dump($auth->verify($code, time() + 2 * $options->period)); // -> true
46+
var_dump($auth->verify($code, (time() + 2 * $options->period))); // -> true
4747

4848
// create an URI for use in e.g. QR codes
4949
// -> otpauth://totp/test?secret=JQUZJ44H6M3SATXIJRKTK64VQMIU73JN&issuer=example.com&digits=8&algorithm=SHA512&period=60

phpcs.xml.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138

139139
<rule ref="Squiz">
140140
<exclude name="Squiz.Arrays.ArrayDeclaration.IndexNoNewline" />
141+
<exclude name="Squiz.Arrays.ArrayDeclaration.MultiLineNotAllowed" />
141142
<exclude name="Squiz.Arrays.ArrayDeclaration.SingleLineNotAllowed" />
142143
<exclude name="Squiz.Arrays.ArrayDeclaration.ValueNoNewline" />
143144
<exclude name="Squiz.Classes.ClassDeclaration" />

0 commit comments

Comments
 (0)