Use the expression assignment operator to simplify code
Suggested by phan, available since php7.4
Change-Id: Ic372ba9abb14de1196b89fca079e99168464eb06