Skip to content

Commit

Permalink
Merge pull request #661 from nextcloud/dependabot/composer/nextcloud/…
Browse files Browse the repository at this point in the history
…coding-standard-1.3.1
  • Loading branch information
dependabot[bot] authored Oct 13, 2024
2 parents 273e877 + ecb49b5 commit 0e1ef2f
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 15 deletions.
71 changes: 59 additions & 12 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/Controller/IPWhitelistController.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function add(string $ip, int $mask): JSONResponse {
$id++;

$value = $ip . '/' . $mask;
$this->config->setAppValue('bruteForce', 'whitelist_'.$id, $value);
$this->config->setAppValue('bruteForce', 'whitelist_' . $id, $value);
return new JSONResponse([
'id' => $id,
'ip' => $ip,
Expand All @@ -106,7 +106,7 @@ public function add(string $ip, int $mask): JSONResponse {
* @return JSONResponse
*/
public function remove(int $id): JSONResponse {
$this->config->deleteAppValue('bruteForce', 'whitelist_'.$id);
$this->config->deleteAppValue('bruteForce', 'whitelist_' . $id);

return new JSONResponse([]);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Controller/IPWhitelistControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function testAdd($ip, $mask, $valid) {
->with(
$this->equalTo('bruteForce'),
$this->equalTo('whitelist_100'),
$this->equalTo($ip.'/'.$mask)
$this->equalTo($ip . '/' . $mask)
);

$expected = new JSONResponse([
Expand Down

0 comments on commit 0e1ef2f

Please sign in to comment.