/** * @param Calendar $calendar * * @return string */ protected function buildCalendarName(Calendar $calendar) { $name = $calendar->getName(); if (!$name) { $name = $this->entityNameResolver->getName($calendar->getOwner()); } return $name; }
/** * @param Calendar $calendar * * @return string */ protected function buildCalendarName(Calendar $calendar) { return $calendar->getName() ?: $this->entityNameResolver->getName($calendar->getOwner()); }
public function testToString() { $obj = new Calendar(); $obj->setName('testName'); $this->assertEquals($obj->getName(), (string) $obj); }