Skip to content

Commit fde3136

Browse files
committed
Don't use by reference
1 parent a746659 commit fde3136

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/controllers/Credits.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ protected function getCredits(CreditsModel &$model) {
2525
$credits = new CreditsLib();
2626
$model->total_users = CreditsLib::getTotalUsers();
2727
$model->top_contributors_by_documents
28-
= &$credits->getTopContributorsByDocuments();
28+
= $credits->getTopContributorsByDocuments();
2929
$model->top_contributors_by_news_posts
30-
= &$credits->getTopContributorsByNewsPosts();
30+
= $credits->getTopContributorsByNewsPosts();
3131
$model->top_contributors_by_packets
32-
= &$credits->getTopContributorsByPackets();
32+
= $credits->getTopContributorsByPackets();
3333
$model->top_contributors_by_servers
34-
= &$credits->getTopContributorsByServers();
34+
= $credits->getTopContributorsByServers();
3535
}
3636
}

src/libraries/Credits.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class Credits {
1212

13-
public static function &getTotalUsers() {
13+
public static function getTotalUsers() {
1414
if (!isset(Common::$database)) {
1515
Common::$database = DatabaseDriver::getDatabaseObject();
1616
}
@@ -23,7 +23,7 @@ public static function &getTotalUsers() {
2323
return (int) $obj->sum;
2424
}
2525

26-
public function &getTopContributorsByDocuments() {
26+
public function getTopContributorsByDocuments() {
2727
if (!isset(Common::$database)) {
2828
Common::$database = DatabaseDriver::getDatabaseObject();
2929
}
@@ -55,7 +55,7 @@ public function &getTopContributorsByDocuments() {
5555
return $result;
5656
}
5757

58-
public function &getTopContributorsByNewsPosts() {
58+
public function getTopContributorsByNewsPosts() {
5959
if (!isset(Common::$database)) {
6060
Common::$database = DatabaseDriver::getDatabaseObject();
6161
}
@@ -87,7 +87,7 @@ public function &getTopContributorsByNewsPosts() {
8787
return $result;
8888
}
8989

90-
public function &getTopContributorsByPackets() {
90+
public function getTopContributorsByPackets() {
9191
if (!isset(Common::$database)) {
9292
Common::$database = DatabaseDriver::getDatabaseObject();
9393
}
@@ -119,7 +119,7 @@ public function &getTopContributorsByPackets() {
119119
return $result;
120120
}
121121

122-
public function &getTopContributorsByServers() {
122+
public function getTopContributorsByServers() {
123123
if (!isset(Common::$database)) {
124124
Common::$database = DatabaseDriver::getDatabaseObject();
125125
}

0 commit comments

Comments
 (0)