Okay so all you need to do to comply with this law is collect working hours.
The net effect for some is likely to be “to ensure compliance, make sure to never employ someone from Portugal.” To the extent that is the outcome, Portuguese workers are harmed.
It seems to me that I can’t, but perhaps you see a way that’s “not that complicated”?