Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 7e2e441

Browse files
authored
Merge branch 'master' into develop
2 parents 4aed2dd + 011a83c commit 7e2e441

File tree

7 files changed

+21
-32
lines changed

7 files changed

+21
-32
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ changetracking:
1818
bug_patterns: ["\bfix(?:es|ed)?\b"]
1919
feature_patterns: ["\badd(?:s|ed)?\b", "\bimplement(?:s|ed)?\b"]
2020

21-
checks:
22-
php:
23-
sql_injection_vulnerabilities: true
24-
2521
coding_style:
2622
php:
2723
indentation:
@@ -125,4 +121,4 @@ coding_style:
125121
keywords:
126122
general: lower
127123
constants:
128-
true_false_null: lower
124+
true_false_null: lower

src/VectorNetworkProject/DataProvider/Main.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function onEnable()
3737

3838
public function onDisable()
3939
{
40-
if($this->connector !== null)
40+
if ($this->connector !== null)
4141
{
4242
$this->connector->close();
4343
}

src/VectorNetworkProject/DataProvider/Tables/Accounts/Accounts.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public function init(): void
3030
* @param callable|null $onInserted
3131
* @param callable|null $onError
3232
*/
33-
public function register(IPlayer $player, ?callable $onInserted = null, ?callable $onError = null)
34-
{
33+
public function register(IPlayer $player, ?callable $onInserted = null, ?callable $onError = null) {
3534
$this->connector->executeInsert(self::ACCOUNT_REGISTER, [$player->getName()], $onInserted, $onError);
3635
}
3736

@@ -42,8 +41,7 @@ public function register(IPlayer $player, ?callable $onInserted = null, ?callabl
4241
* @param callable|null $onSuccess
4342
* @param callable|null $onError
4443
*/
45-
public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callable $onError = null)
46-
{
44+
public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callable $onError = null) {
4745
$this->connector->executeChange(self::ACCOUNT_UNREGISTER, [$player->getName()], $onSuccess, $onError);
4846
}
4947

@@ -54,7 +52,7 @@ public function unregister(IPlayer $player, ?callable $onSuccess = null, ?callab
5452
* @param callable|null $onSelect
5553
* @param callable|null $onError
5654
*/
57-
public function get(IPlayer $player, ?callable $onSelect = null, ?callable $onError = null){
55+
public function get(IPlayer $player, ?callable $onSelect = null, ?callable $onError = null) {
5856
$this->connector->executeSelect(self::ACCOUNT_GET, [$player->getName()], $onSelect, $onError);
5957
}
6058
}

src/VectorNetworkProject/DataProvider/Tables/Dual/Dual.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
class Dual extends TableBase
1515
{
16-
public const INIT = 'userdataprovider.duel.init';
17-
public const REGISTER = 'userdataprovider.duel.register';
16+
public const INIT = 'userdataprovider.duel.init';
17+
public const REGISTER = 'userdataprovider.duel.register';
1818
public const UNREGISTER = 'userdataprovider.duel.unregister';
19-
public const GET = 'userdataprovider.duel.get';
20-
public const ADD_COUNT = 'userdataprovider.duel.add';
19+
public const GET = 'userdataprovider.duel.get';
20+
public const ADD_COUNT = 'userdataprovider.duel.addcount';
2121
public const GET_RANKING = 'userdataprovider.duel.getrankingbywin';
2222

2323
public function init(): void

src/VectorNetworkProject/DataProvider/Tables/FFAPvP/FFAPvP.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
class FFAPvP extends TableBase
1515
{
16-
public const INIT = 'userdataprovider.ffapvp.init';
17-
public const REGISTER = 'userdataprovider.ffapvp.register';
18-
public const UNREGISTER = 'userdataprovider.ffapvp.unregister';
19-
public const GET = 'userdataprovider.ffapvp.get';
20-
public const ADD_COUNT = 'userdataprovider.ffapvp.add';
16+
public const INIT = 'userdataprovider.ffapvp.init';
17+
public const REGISTER = 'userdataprovider.ffapvp.register';
18+
public const UNREGISTER = 'userdataprovider.ffapvp.unregister';
19+
public const GET = 'userdataprovider.ffapvp.get';
20+
public const ADD_COUNT = 'userdataprovider.ffapvp.addcount';
2121
public const GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill';
2222
public const GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp';
2323

@@ -48,7 +48,7 @@ public function register(IPLayer $player, ?callable $onInserted = null, ?callabl
4848
*/
4949
public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callable $onError = null): void
5050
{
51-
$this->connector->executeChange(self::UNREGISTER, [$player->getName()], $onSuccess, $onError );
51+
$this->connector->executeChange(self::UNREGISTER, [$player->getName()], $onSuccess, $onError);
5252
}
5353

5454
/**
@@ -71,8 +71,7 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
7171
* @param int $death
7272
* @param int $exp
7373
*/
74-
public function add(IPlayer $player, int $kill = 0, int $death = 0, int $exp = 0)
75-
{
74+
public function add(IPlayer $player, int $kill = 0, int $death = 0, int $exp = 0) {
7675
$this->connector->executeChange(self::ADD_COUNT, [$player->getName(), $kill, $death, $exp]);
7776
}
7877

@@ -82,8 +81,7 @@ public function add(IPlayer $player, int $kill = 0, int $death = 0, int $exp = 0
8281
* @param IPlayer $player
8382
* @param int $kill
8483
*/
85-
public function addKill(IPlayer $player, int $kill)
86-
{
84+
public function addKill(IPlayer $player, int $kill) {
8785
$this->add($player, $kill);
8886
}
8987

@@ -93,8 +91,7 @@ public function addKill(IPlayer $player, int $kill)
9391
* @param IPlayer $player
9492
* @param int $death
9593
*/
96-
public function addDeath(IPlayer $player, int $death)
97-
{
94+
public function addDeath(IPlayer $player, int $death) {
9895
$this->add($player, 0, $death);
9996
}
10097

@@ -104,7 +101,7 @@ public function addDeath(IPlayer $player, int $death)
104101
* @param IPlayer $player
105102
* @param int $exp
106103
*/
107-
public function addExp(IPlayer $player,int $exp)
104+
public function addExp(IPlayer $player, int $exp)
108105
{
109106
$this->add($player, 0, 0, $exp);
110107
}

src/VectorNetworkProject/DataProvider/Tables/TableBase.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ abstract class TableBase
1515
{
1616
/** @var DataConnector */
1717
protected $connector;
18-
public final function __construct(DataConnector $connector)
19-
{
18+
public final function __construct(DataConnector $connector) {
2019
$this->connector = $connector;
2120
$this->init();
2221
}

src/VectorNetworkProject/DataProvider/Tables/TableManager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class TableManager
2929
/** @var CorePvP */
3030
protected $corepvp;
3131

32-
public function __construct(DataConnector $connector)
33-
{
32+
public function __construct(DataConnector $connector) {
3433
$this->connector = $connector;
3534
$this->accounts = new Accounts($connector);
3635
$this->ffapvp = new FFAPvP($connector);

0 commit comments

Comments
 (0)