Skip to content

Commit

Permalink
Don't use by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Mar 3, 2021
1 parent a746659 commit fde3136
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions src/controllers/Credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ protected function getCredits(CreditsModel &$model) {
$credits = new CreditsLib();
$model->total_users = CreditsLib::getTotalUsers();
$model->top_contributors_by_documents
= &$credits->getTopContributorsByDocuments();
= $credits->getTopContributorsByDocuments();
$model->top_contributors_by_news_posts
= &$credits->getTopContributorsByNewsPosts();
= $credits->getTopContributorsByNewsPosts();
$model->top_contributors_by_packets
= &$credits->getTopContributorsByPackets();
= $credits->getTopContributorsByPackets();
$model->top_contributors_by_servers
= &$credits->getTopContributorsByServers();
= $credits->getTopContributorsByServers();
}
}
10 changes: 5 additions & 5 deletions src/libraries/Credits.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class Credits {

public static function &getTotalUsers() {
public static function getTotalUsers() {
if (!isset(Common::$database)) {
Common::$database = DatabaseDriver::getDatabaseObject();
}
Expand All @@ -23,7 +23,7 @@ public static function &getTotalUsers() {
return (int) $obj->sum;
}

public function &getTopContributorsByDocuments() {
public function getTopContributorsByDocuments() {
if (!isset(Common::$database)) {
Common::$database = DatabaseDriver::getDatabaseObject();
}
Expand Down Expand Up @@ -55,7 +55,7 @@ public function &getTopContributorsByDocuments() {
return $result;
}

public function &getTopContributorsByNewsPosts() {
public function getTopContributorsByNewsPosts() {
if (!isset(Common::$database)) {
Common::$database = DatabaseDriver::getDatabaseObject();
}
Expand Down Expand Up @@ -87,7 +87,7 @@ public function &getTopContributorsByNewsPosts() {
return $result;
}

public function &getTopContributorsByPackets() {
public function getTopContributorsByPackets() {
if (!isset(Common::$database)) {
Common::$database = DatabaseDriver::getDatabaseObject();
}
Expand Down Expand Up @@ -119,7 +119,7 @@ public function &getTopContributorsByPackets() {
return $result;
}

public function &getTopContributorsByServers() {
public function getTopContributorsByServers() {
if (!isset(Common::$database)) {
Common::$database = DatabaseDriver::getDatabaseObject();
}
Expand Down

0 comments on commit fde3136

Please sign in to comment.