Skip to content

Commit f4051df

Browse files
committed
Changed behaviour of braces
1 parent eb6b21a commit f4051df

File tree

2 files changed

+18
-28
lines changed

2 files changed

+18
-28
lines changed

PAFLib/PAFPlayer.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,30 @@
88
namespace PartyAndFriends\Lib\PAFPlayer;
99
require_once('PAFPlayerManager.php');
1010

11-
class PAFPlayer
12-
{
11+
class PAFPlayer {
1312
private $uniqueID;
1413
private $name;
1514
private $id;
1615

17-
function __construct($pUUID, $pName, $pID)
18-
{
16+
function __construct($pUUID, $pName, $pID) {
1917
$this->uniqueID = $pUUID;
2018
$this->name = $pName;
2119
$this->id = $pID;
2220
}
2321

24-
function getName()
25-
{
22+
function getName() {
2623
return $this->name;
2724
}
2825

29-
function getUniqueID()
30-
{
26+
function getUniqueID() {
3127
return $this->uniqueID;
3228
}
3329

34-
function getID()
35-
{
30+
function getID() {
3631
return $this->id;
3732
}
3833

39-
function getFriends()
40-
{
34+
function getFriends() {
4135
$stmt = PAFPlayerManager::getInstance()->getConnection()->prepare("SELECT player_id, player_uuid, player_name FROM " . PAFPlayerManager::getInstance()->getTablePrefix() . "_players WHERE player_id IN(SELECT friend1_id FROM fr_friend_assignment WHERE friend2_id='" . $this->id . "') OR player_id IN(SELECT friend2_id FROM fr_friend_assignment WHERE friend1_id='" . $this->id . "') LIMIT 1");
4236
$stmt->execute();
4337
$i = 0;

PAFLib/PAFPlayerManager.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,18 @@
1212
* Class PAFPlayerManager This class is to get
1313
* @package PartyAndFriends\Lib\PAFPlayer
1414
*/
15-
class PAFPlayerManager
16-
{
15+
class PAFPlayerManager {
1716
private static $instance;
1817
private $connection;
1918
private $tablePrefix;
2019

21-
function __construct($pPod, $tablePrefix)
22-
{
20+
function __construct($pPod, $tablePrefix) {
2321
self::$instance = $this;
2422
$this->connection = $pPod;
2523
$this->tablePrefix = $tablePrefix;
2624
}
2725

28-
public function getPlayerByUUID($pUUID)
29-
{
26+
public function getPlayerByUUID($pUUID) {
3027
$stmt = $this->connection->prepare("SELECT player_id, player_uuid, player_name FROM fr_players WHERE player_uuid=:uuid LIMIT 1");
3128
$stmt->bindParam(':uuid', $pUUID);
3229
$stmt->execute();
@@ -37,8 +34,7 @@ public function getPlayerByUUID($pUUID)
3734
return new PAFPlayer($row['player_uuid'], $row['player_name'], $row['player_id']);
3835
}
3936

40-
public function getPlayerByID($pID)
41-
{
37+
public function getPlayerByID($pID) {
4238
$stmt = $this->connection->prepare("SELECT player_id, player_uuid, player_name FROM fr_players WHERE player_id=:id LIMIT 1");
4339
$stmt->bindParam(':id', $pID);
4440
$stmt->execute();
@@ -49,13 +45,11 @@ public function getPlayerByID($pID)
4945
return new PAFPlayer($row['player_uuid'], $row['player_name'], $row['player_id']);
5046
}
5147

52-
public function getConnection()
53-
{
48+
public function getConnection() {
5449
return $this->connection;
5550
}
5651

57-
public function getPlayerByName($pPlayerName)
58-
{
52+
public function getPlayerByName($pPlayerName) {
5953
$stmt = $this->connection->prepare("SELECT player_id, player_uuid, player_name FROM " . PAFPlayerManager::getInstance()->getTablePrefix() . "players WHERE player_name=:name LIMIT 1");
6054
$stmt->bindParam(':name', $pPlayerName);
6155
$stmt->execute();
@@ -69,14 +63,16 @@ public function getPlayerByName($pPlayerName)
6963
/**
7064
* @return String
7165
*/
72-
public function getTablePrefix()
73-
{
66+
public function getTablePrefix() {
7467
return $this->tablePrefix;
7568
}
7669

77-
public static function getInstance()
78-
{
70+
public static function getInstance() {
7971
return self::$instance;
8072
}
8173

74+
public function getSetting() {
75+
76+
}
77+
8278
}

0 commit comments

Comments
 (0)