Compact photonic integrated phase and amplitude controller for phased-array antennas