File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ function unparse_description() {
174
174
}
175
175
/** @return PaperReviewPreference */
176
176
private function preference_data ($ before ) {
177
- $ pref = $ this ->item ->get ($ before , "_pref " );
177
+ $ pref = $ this ->item ->get ($ before , "_pref " ) ?? 0 ;
178
178
$ exp = $ this ->item ->get ($ before , "_exp " );
179
179
if ($ exp === "N " ) {
180
180
$ exp = null ;
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class PaperReviewPreference {
13
13
/** @param int $preference
14
14
* @param ?int $expertise */
15
15
function __construct ($ preference = 0 , $ expertise = null ) {
16
- $ this ->preference = $ preference ;
16
+ $ this ->preference = $ preference ?? 0 ;
17
17
$ this ->expertise = $ expertise ;
18
18
}
19
19
@@ -29,7 +29,7 @@ function exists() {
29
29
30
30
/** @return string */
31
31
function unparse () {
32
- return ( $ this ->preference ?? " 0 " ) . unparse_expertise ($ this ->expertise );
32
+ return $ this ->preference . unparse_expertise ($ this ->expertise );
33
33
}
34
34
35
35
/** @param PaperReviewPreference $a
You can’t perform that action at this time.
0 commit comments