What does the "phase margin" parameter of an opamp imply?
The phase margin PM is a measure for the stability of a system with feedback. And, thus, it also applies to operational amplifiers.
The PM is defined for the LOOP GAIN of the system - that means: open the loop at a suitable node and measure/simulate the gain and the phase around the complete loop.
Then ,the PM is the DIFFERENCE between the measured phase and -360 deg (that means: The "distance" to the oscillation condition, positive feedback) at the frequency which gives unity loop gain.
Without taking the phase inversion at the inverting input into account, the PM is the "distance" to -180 deg.

Now, for an opamp the most critical situation arises for 100% feedback (unity gain operation). In this case, the feedback factor is unity and the Loop gain is identical to the open-loop gain Ao of the opamp.
Normally, only this condition is used to specify the PM in the opamp´s data sheet.

Summary: The PM as given for an opamp is the DIFFERENCE between the opamp´s phase shift and -180 deg at the unity-gain frequency.