In that case, it's just a matter of getting used to the idiom, or learning to read code more fluently. Code is not English, any more than the pattern of pieces on a chessboard or an engineering blueprint. But you learn how to arrange the information in your mind and then how to extract that from the presented form.
The mental things to take in are:
- assign to $a
- different things depending on b
- the specific things
So, the presented order does match how you grasp it, even though it's not a natural order in an English sentence.