Hello
The following line:
$referenceNode = array(
'type' => 'paragraph',
);
$stylecontents = $docx->getWordStyles($referenceNode);
returns the styles applied to the whole paragraph. Maybe the style you want to query is not applied to the whole paragraph but to a run-of-text content in the paragraph.
As detailed on the documentation page:
type string * (all, default value), chart, image, default, list, paragraph (also for links and lists), run, style, table, table-row, table-cell or a custom tag.
Maybe you need to query by run type, not paragraph.
Regards.