Skip to content

Commit

Permalink
Type nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Feb 24, 2021
1 parent c6bafd0 commit afecaef
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/meetingtracker.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
// meetingtracker.php -- HotCRP meeting tracker support
// Copyright (c) 2006-2020 Eddie Kohler; see LICENSE.
// Copyright (c) 2006-2021 Eddie Kohler; see LICENSE.

class MeetingTracker {
static function lookup(Conf $conf) {
Expand Down Expand Up @@ -75,9 +75,12 @@ static function contact_tracker_comet(Conf $conf, $pids = null) {

// first drop notification json in trackerCometUpdateDirectory
if ($comet_dir) {
$j = ["ok" => true, "conference" => $url,
"tracker_status" => self::tracker_status($tracker),
"tracker_status_at" => $tracker->position_at];
$j = [
"ok" => true,
"conference" => $url,
"tracker_status" => self::tracker_status($tracker),
"tracker_status_at" => $tracker->position_at
];
if ($pids) {
$j["pulse"] = true;
}
Expand Down Expand Up @@ -120,11 +123,10 @@ static function contact_tracker_comet(Conf $conf, $pids = null) {
$comet_url .= "/";
}

$context = stream_context_create(array("http" =>
array("method" => "GET",
"ignore_errors" => true,
"content" => "",
"timeout" => 1.0)));
$context = stream_context_create(["http" => [
"method" => "GET", "ignore_errors" => true,
"content" => "", "timeout" => 1.0
]]);
$comet_url .= "update?conference=" . urlencode($url)
. "&tracker_status=" . urlencode(self::tracker_status($tracker))
. "&tracker_status_at=" . $tracker->position_at;
Expand Down Expand Up @@ -668,7 +670,7 @@ static private function trinfo_papers($tis, $trs, Contact $user) {

foreach ($tis as $ti_index => $ti) {
$papers = [];
foreach (isset($ti->papers) ? $ti->papers : [] as $pid) {
foreach ($ti->papers ?? [] as $pid) {
$prow = $prows->get($pid);
$papers[] = $p = (object) [];
if (($track_manager
Expand Down

0 comments on commit afecaef

Please sign in to comment.