* @param $element Element name to set as current main node
* @return $currMainNode Current main node
*/
- private final function setCurrMainNode ($element) {
- $this->curr['main_node'] = (string) $element;
+ private final function setCurrMainNode (string $element) {
+ $this->curr['main_node'] = $element;
}
/**
* @param $templateDependency A template to load to satisfy dependencies
* @return void
*/
- protected function handleTemplateDependency ($node, $templateDependency) {
+ protected function handleTemplateDependency (string $node, string $templateDependency) {
// Check that the XML node is not empty
assert(!empty($node));
* @return void
* @throws InvalidXmlNodeException If an unknown/invalid XML node name was found
*/
- public final function startElement ($resource, $element, array $attributes) {
+ public final function startElement ($resource, string $element, array $attributes) {
// Initial method name which will never be called...
$methodName = 'init' . StringUtils::convertToClassName($this->xmlTemplateType);
* @return void
* @throws XmlNodeMismatchException If current main node mismatches the closing one
*/
- public final function finishElement ($resource, $nodeName) {
+ public final function finishElement ($resource, string $nodeName) {
// Make all lower-case
$nodeName = strtolower($nodeName);