Release 2.0.26 (#4087)
- setting "rounding days" not required - developer: added user pref for public holiday group (to be used by plugins) - developer: added WorkingTimeYearEvent (to be used by plugins) - user pref: cleanup work contract form and support more fields (to be used by plugins) - code cleanup - bump theme and composer packages
This commit is contained in:
@@ -239,7 +239,7 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
|
||||
* Make sure begin and end date have the correct timezone.
|
||||
* This will be called once for each item after being loaded from the database.
|
||||
*/
|
||||
protected function localizeDates()
|
||||
protected function localizeDates(): void
|
||||
{
|
||||
if ($this->localized) {
|
||||
return;
|
||||
@@ -432,7 +432,7 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
|
||||
/**
|
||||
* @param Tag $tag
|
||||
*/
|
||||
public function removeTag(Tag $tag)
|
||||
public function removeTag(Tag $tag): void
|
||||
{
|
||||
if (!$this->tags->contains($tag)) {
|
||||
return;
|
||||
@@ -453,11 +453,14 @@ class Timesheet implements EntityWithMetaFields, ExportableItem
|
||||
*/
|
||||
public function getTagsAsArray(): array
|
||||
{
|
||||
/** @var array<Tag> $tags */
|
||||
$tags = $this->getTags()->toArray();
|
||||
|
||||
return array_map(
|
||||
function (Tag $element) {
|
||||
return $element->getName();
|
||||
function ($element) {
|
||||
return (string) $element->getName();
|
||||
},
|
||||
$this->getTags()->toArray()
|
||||
$tags
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user