Hello,
Please send your template to contact[at]phpdocx.com and we'll check it. We have done some tests and everything is working fine, maybe there's some problem with the template that could be easily fixed.
UPDATE:
Thanks for the document. The problem is that paragraphs contain strings with the same name than the placeholders. Please use other placeholder names, such as:
$values = [
'templateId' => 16,
'templateName' => 'foobar',
'templateOrder' => 1,
];
and it'll work fine.
Regards.