The European Union's top court has said some FIFA transfer rules are contrary to European Union legislation relating to competition and freedom of movement.