@ -28,7 +28,7 @@ function event_config_edit_controller()
$teardown_end_date = null;
$event_config = EventConfig();
if (empty($event_config)) {
if (!empty($event_config)) {
$event_name = $event_config['event_name'];
$buildup_start_date = $event_config['buildup_start_date'];
$event_start_date = $event_config['event_start_date'];
@ -42,9 +42,10 @@ function check_request_datetime($date_name, $time_name, $allowed_days, $default_
function parse_date($pattern, $value)
{
$datetime = DateTime::createFromFormat($pattern, trim($value));
if (is_null($datetime)) {
if (!$datetime) {
return null;
}
return $datetime->getTimestamp();
@ -24,11 +24,11 @@ class RoomModelTest extends TestCase
$room = Room($this->room_id);
$this->assertNotFalse($room);
$this->assertNotEmpty($room);
$this->assertNotNull($room);
$this->assertEquals($room['Name'], 'test');
$this->assertNull(Room(-1));
$this->assertEmpty(Room(-1));
public function tearDown()