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

Commit 51c70eb

Browse files
author
UramnOIL
committed
リファクタリング
1 parent db13e27 commit 51c70eb

File tree

1 file changed

+14
-14
lines changed
  • src/VectorNetworkProject/DataProvider/Tables/FFAPvP

1 file changed

+14
-14
lines changed

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

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

1414
class FFAPvP extends TableBase
1515
{
16-
public const FFAPVP_INIT = 'userdataprovider.ffapvp.init';
17-
public const FFAPVP_REGISTER = 'userdataprovider.ffapvp.register';
18-
public const FFAPVP_UNREGISTER = 'userdataprovider.ffapvp.unregister';
19-
public const FFAPVP_GET = 'userdataprovider.ffapvp.get';
20-
public const FFAPVP_ADD_COUNT = 'userdataprovider.ffapvp.addcount';
21-
public const FFAPVP_GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill';
22-
public const FFAPVP_GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp';
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';
21+
public const GET_RANKING_BY_KILL = 'userdataprovider.ffapvp.getrankingbykill';
22+
public const GET_RANKING_BY_EXP = 'userdataprovider.ffapvp.getrankingbyexp';
2323

2424
public function init(): void
2525
{
26-
$this->connector->executeGeneric(self::FFAPVP_INIT);
26+
$this->connector->executeGeneric(self::INIT);
2727
}
2828

2929
/**
@@ -35,7 +35,7 @@ public function init(): void
3535
*/
3636
public function register(IPLayer $player, ?callable $onInserted = null, ?callable $onError = null): void
3737
{
38-
$this->connector->executeInsert(self::FFAPVP_REGISTER, [$player->getname()], $onInserted, $onError);
38+
$this->connector->executeInsert(self::REGISTER, [$player->getname()], $onInserted, $onError);
3939

4040
}
4141

@@ -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::FFAPVP_UNREGISTER, [$player->getName()], $onSuccess, $onError );
51+
$this->connector->executeChange(self::UNREGISTER, [$player->getName()], $onSuccess, $onError );
5252
}
5353

5454
/**
@@ -60,7 +60,7 @@ public function unregister(IPLayer $player, ?callable $onSuccess = null, ?callab
6060
*/
6161
public function get(IPlayer $player, callable $onSuccess = null, ?callable $onError = null): void
6262
{
63-
$this->connector->executeSelect(self::FFAPVP_GET, [$player->getName()], $onSuccess, $onError);
63+
$this->connector->executeSelect(self::GET, [$player->getName()], $onSuccess, $onError);
6464
}
6565

6666
/**
@@ -73,7 +73,7 @@ public function get(IPlayer $player, callable $onSuccess = null, ?callable $onEr
7373
*/
7474
public function add(IPlayer $player, int $kill = 0, int $death = 0, int $exp = 0)
7575
{
76-
$this->connector->executeChange(self::FFAPVP_ADD_COUNT, [$player->getName(), $kill, $death, $exp]);
76+
$this->connector->executeChange(self::ADD_COUNT, [$player->getName(), $kill, $death, $exp]);
7777
}
7878

7979
/**
@@ -118,7 +118,7 @@ public function addExp(IPlayer $player,int $exp)
118118
*/
119119
public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callable $onError = null): void
120120
{
121-
$this->connector->executeSelect(self::FFAPVP_GET_RANKING_BY_KILL, [$limit], $onSelect, $onError);
121+
$this->connector->executeSelect(self::GET_RANKING_BY_KILL, [$limit], $onSelect, $onError);
122122
}
123123

124124
/**
@@ -130,6 +130,6 @@ public function getRankingByKill(int $limit, ?callable $onSelect = null, ?callab
130130
*/
131131
public function getRankingByExp(int $limit, ?callable $onSelect = null, ?callable $onError = null): void
132132
{
133-
$this->connector->executeSelect(self::FFAPVP_GET_RANKING_BY_EXP, [$limit], $onSelect, $onError);
133+
$this->connector->executeSelect(self::GET_RANKING_BY_EXP, [$limit], $onSelect, $onError);
134134
}
135135
}

0 commit comments

Comments
 (0)