I'm in the process of moving to Portugal myself, so most of my information is based on research, rather than practice, but I'll give it a try:
You automatically deemed to be a Portuguese tax resident by staying in the country more than 183 days in a year, or maintaining a habitual residence.
In...