Individual income taxation in Portugal is based on residence.
Under Portuguese law individuals are resident in Portugal for tax purposes if they meet at least one of the following criteria:
Spend more than 183 days in Portugal during any 12-month period
Maintains a primary residence in Portugal.
If an individual is resident in Portugal, they will be taxed on their worldwide income.
If an individual is not resident in Portugal, they will be subject to tax on their Portuguese-source income.