mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
lint
This commit is contained in:
parent
68f20ac903
commit
c29fe61ad1
24 changed files with 1242 additions and 50 deletions
|
|
@ -65,7 +65,7 @@ class UserProvider extends BaseProvider {
|
|||
->setMaxResults(1);
|
||||
|
||||
$result = $query->execute()->fetch();
|
||||
if (is_array($result)) {
|
||||
if (\is_array($result)) {
|
||||
return $result;
|
||||
} else {
|
||||
return null;
|
||||
|
|
@ -74,6 +74,7 @@ class UserProvider extends BaseProvider {
|
|||
|
||||
/**
|
||||
* @param string $search
|
||||
*
|
||||
* @return SteamUser[]
|
||||
*/
|
||||
public function search(string $search): array {
|
||||
|
|
@ -102,7 +103,7 @@ class UserProvider extends BaseProvider {
|
|||
$countWeight = 1;
|
||||
$simWeight = 5;
|
||||
$diff = ($a['sim'] * $simWeight + $a['count'] * $countWeight) - ($b['sim'] * $simWeight + $b['count'] * $countWeight);
|
||||
if ($diff === 0) {
|
||||
if (0 === $diff) {
|
||||
return 0;
|
||||
} else {
|
||||
return ($diff < 0) ? -1 : 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue