«وَالْمَجَازُ مُرْسَلٌ إِنْ كَانَتِ الْعَلَاقَةُ غَيْرَ الْمُشَابَهَةِ»
A word-level trope based on a relation other than resemblance is called majāz mursal.
When the relation is similarity, the figure is istiʿārah (metaphor). Classification therefore depends on the kind of relation, not simply on whether the sense is nonliteral.
“Eye” for a watchman can rest on a part or function; “lion” for a courageous person rests on bravery. Both need contextual support, but their relations differ.