Magistrates courts break health and safety laws