In the Apple case, the EU Commission accused Ireland of providing illegal state aid to 2 Apple Irish nondomiciled companies' branches in Ireland in the form of tax rulings which were not at arm's length. It required Ireland to recuperate the state aid provided.
Ireland and the Apple companies successfully requested the General Court to annul the Commission's decision. The court did so essentially on the ground that the Irish tax rulings were not selective because no Irish branch of a Irish nondomiciled company would be requested to allocated profits to Ireland which were not connected to the branch. This is true even if the Irish company has no employees other than the employees in the Irish branch.
You can download the original decision here: http://curia.europa.eu/juris/document...
Want to learn more about International corporate income tax or Transfer pricing? See https://johannmuller.teachable.com/