3 foot passing law

Was out on my bike today and on the way home almost got hit by a car. The car was heading in the same direction and almost side swiped me. The car was 3ft or less when they went by. Looked online to see if there were any laws for this and there is in 14 other states NOT Pa. Would like to know what others think about this.