@@ -83,7 +83,7 @@ class Contest extends BaseApiEntity implements
8383 options: ['comment ' => 'Time contest becomes visible in team/public views ' , 'unsigned ' => true ]
8484 )]
8585 #[Serializer \Exclude]
86- private string | float | null $ activatetime ;
86+ private ? float $ activatetime ;
8787
8888 #[ORM \Column(
8989 type: 'decimal ' ,
@@ -92,7 +92,7 @@ class Contest extends BaseApiEntity implements
9292 options: ['comment ' => 'Time contest starts, submissions accepted ' , 'unsigned ' => true ]
9393 )]
9494 #[Serializer \Exclude]
95- private string | float | null $ starttime = null ;
95+ private ? float $ starttime = null ;
9696
9797 #[ORM \Column(options: [
9898 'comment ' => 'If disabled, starttime is not used, e.g. to delay contest start ' ,
@@ -109,7 +109,7 @@ class Contest extends BaseApiEntity implements
109109 options: ['comment ' => 'Time scoreboard is frozen ' , 'unsigned ' => true ]
110110 )]
111111 #[Serializer \Exclude]
112- private string | float | null $ freezetime = null ;
112+ private ? float $ freezetime = null ;
113113
114114 #[ORM \Column(
115115 type: 'decimal ' ,
@@ -118,7 +118,7 @@ class Contest extends BaseApiEntity implements
118118 options: ['comment ' => 'Time after which no more submissions are accepted ' , 'unsigned ' => true ]
119119 )]
120120 #[Serializer \Exclude]
121- private string | float | null $ endtime ;
121+ private ? float $ endtime ;
122122
123123 #[ORM \Column(
124124 type: 'decimal ' ,
@@ -128,7 +128,7 @@ class Contest extends BaseApiEntity implements
128128 options: ['comment ' => 'Unfreeze a frozen scoreboard at this time ' , 'unsigned ' => true ]
129129 )]
130130 #[Serializer \Exclude]
131- private string | float | null $ unfreezetime = null ;
131+ private ? float $ unfreezetime = null ;
132132
133133 #[ORM \Column(
134134 type: 'decimal ' ,
@@ -138,7 +138,7 @@ class Contest extends BaseApiEntity implements
138138 options: ['comment ' => 'Time when contest was finalized, null if not yet ' , 'unsigned ' => true ]
139139 )]
140140 #[Serializer \Exclude]
141- private string | float | null $ finalizetime = null ;
141+ private ? float $ finalizetime = null ;
142142
143143 #[ORM \Column(
144144 type: 'text ' ,
@@ -213,7 +213,7 @@ public function getScoreboardTypeString(): string
213213 options: ['comment ' => 'Time contest becomes invisible in team/public views ' , 'unsigned ' => true ]
214214 )]
215215 #[Serializer \Exclude]
216- private string | float | null $ deactivatetime = null ;
216+ private ? float $ deactivatetime = null ;
217217
218218 #[ORM \Column(
219219 length: 64 ,
@@ -513,7 +513,7 @@ public function getActivatetime(): ?float
513513 return $ this ->activatetime === null ? null : (float )$ this ->activatetime ;
514514 }
515515
516- public function setStarttime (string | float $ starttime ): Contest
516+ public function setStarttime (float $ starttime ): Contest
517517 {
518518 $ this ->starttime = $ starttime ;
519519 return $ this ;
@@ -581,7 +581,7 @@ public function getFinalizetime(): ?float
581581 return $ this ->finalizetime === null ? null : (float )$ this ->finalizetime ;
582582 }
583583
584- public function setFinalizetime (string | float | null $ finalizetimeString ): Contest
584+ public function setFinalizetime (? float $ finalizetimeString ): Contest
585585 {
586586 $ this ->finalizetime = $ finalizetimeString ;
587587 return $ this ;
@@ -699,34 +699,31 @@ public function getDeactivatetimeString(): ?string
699699 return $ this ->deactivatetimeString ;
700700 }
701701
702- public function setActivatetime (string $ activatetime ): Contest
702+ public function setActivatetime (float $ activatetime ): Contest
703703 {
704704 $ this ->activatetime = $ activatetime ;
705705 return $ this ;
706706 }
707707
708- public function setFreezetime (string $ freezetime ): Contest
708+ public function setFreezetime (float $ freezetime ): Contest
709709 {
710710 $ this ->freezetime = $ freezetime ;
711711 return $ this ;
712712 }
713713
714- public function setEndtime (string $ endtime ): Contest
714+ public function setEndtime (float $ endtime ): Contest
715715 {
716716 $ this ->endtime = $ endtime ;
717717 return $ this ;
718718 }
719719
720- /**
721- * @param string|float $unfreezetime
722- */
723- public function setUnfreezetime ($ unfreezetime ): Contest
720+ public function setUnfreezetime (float $ unfreezetime ): Contest
724721 {
725722 $ this ->unfreezetime = $ unfreezetime ;
726723 return $ this ;
727724 }
728725
729- public function setDeactivatetime (string $ deactivatetime ): Contest
726+ public function setDeactivatetime (float $ deactivatetime ): Contest
730727 {
731728 $ this ->deactivatetime = $ deactivatetime ;
732729 return $ this ;
@@ -1045,7 +1042,7 @@ public function isActive(): bool
10451042 ($ this ->deactivatetime == null || $ this ->deactivatetime > time ());
10461043 }
10471044
1048- public function getAbsoluteTime (?string $ time_string ): float |int |string | null
1045+ public function getAbsoluteTime (?string $ time_string ): float |int |null
10491046 {
10501047 if ($ time_string === null ) {
10511048 return null ;
@@ -1076,7 +1073,7 @@ public function getAbsoluteTime(?string $time_string): float|int|string|null
10761073 } catch (Exception ) {
10771074 return null ;
10781075 }
1079- return $ date ->format ('U.v ' );
1076+ return ( float ) $ date ->format ('U.v ' );
10801077 }
10811078 }
10821079
0 commit comments