Just hours before it was due to go into effect, Gov. Lawrence J. Hogan Jr. (R) vetoed a bill on Thursday night that would…