Skip to content

Commit faf90f6

Browse files
committed
style: break long lines
1 parent 75cf64d commit faf90f6

4 files changed

Lines changed: 22 additions & 6 deletions

File tree

src/Authentication/Authenticators/AccessTokens.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ public function check(array $credentials): Result
124124
if (! array_key_exists('token', $credentials) || empty($credentials['token'])) {
125125
return new Result([
126126
'success' => false,
127-
'reason' => lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['tokens']]),
127+
'reason' => lang(
128+
'Auth.noToken',
129+
[config('AuthToken')->authenticatorHeader['tokens']]
130+
),
128131
]);
129132
}
130133

@@ -190,7 +193,9 @@ public function loggedIn(): bool
190193
$request = service('request');
191194

192195
return $this->attempt([
193-
'token' => $request->getHeaderLine(config('AuthToken')->authenticatorHeader['tokens']),
196+
'token' => $request->getHeaderLine(
197+
config('AuthToken')->authenticatorHeader['tokens']
198+
),
194199
])->isOK();
195200
}
196201

src/Authentication/Authenticators/HmacSha256.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ public function check(array $credentials): Result
124124
if (! array_key_exists('token', $credentials) || $credentials['token'] === '') {
125125
return new Result([
126126
'success' => false,
127-
'reason' => lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['hmac']]),
127+
'reason' => lang(
128+
'Auth.noToken',
129+
[config('AuthToken')->authenticatorHeader['hmac']]
130+
),
128131
]);
129132
}
130133

@@ -202,7 +205,9 @@ public function loggedIn(): bool
202205
$request = service('request');
203206

204207
return $this->attempt([
205-
'token' => $request->getHeaderLine(config('AuthToken')->authenticatorHeader['hmac']),
208+
'token' => $request->getHeaderLine(
209+
config('AuthToken')->authenticatorHeader['hmac']
210+
),
206211
])->isOK();
207212
}
208213

tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ public function testCheckNoToken(): void
110110
$result = $this->auth->check([]);
111111

112112
$this->assertFalse($result->isOK());
113-
$this->assertSame(lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['tokens']]), $result->reason());
113+
$this->assertSame(
114+
lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['tokens']]),
115+
$result->reason()
116+
);
114117
}
115118

116119
public function testCheckBadToken(): void

tests/Authentication/Authenticators/HmacAuthenticatorTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ public function testCheckNoToken(): void
131131
$result = $this->auth->check([]);
132132

133133
$this->assertFalse($result->isOK());
134-
$this->assertSame(lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['hmac']]), $result->reason());
134+
$this->assertSame(
135+
lang('Auth.noToken', [config('AuthToken')->authenticatorHeader['hmac']]),
136+
$result->reason()
137+
);
135138
}
136139

137140
public function testCheckBadSignature(): void

0 commit comments

Comments
 (0)