mirror of
https://github.com/joomla-extensions/jedchecker.git
synced 2025-01-29 00:18:25 +00:00
new inspection: empty element
This commit is contained in:
parent
49b383514e
commit
4d658b082c
@ -87,4 +87,5 @@ COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILDREN="Node <%s> has unknown child elem
|
|||||||
COM_JEDCHECKER_MANIFEST_MISSED_REQUIRED="Node <%1$s> doesn't contain required <%2$s> element"
|
COM_JEDCHECKER_MANIFEST_MISSED_REQUIRED="Node <%1$s> doesn't contain required <%2$s> element"
|
||||||
COM_JEDCHECKER_MANIFEST_MULTIPLE_FOUND="Node <%1$s> contains multiple <%2$s> elements"
|
COM_JEDCHECKER_MANIFEST_MULTIPLE_FOUND="Node <%1$s> contains multiple <%2$s> elements"
|
||||||
COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILD="Node <%1$s> contains unknown <%2$s> element"
|
COM_JEDCHECKER_MANIFEST_UNKNOWN_CHILD="Node <%1$s> contains unknown <%2$s> element"
|
||||||
|
COM_JEDCHECKER_MANIFEST_EMPTY_CHILD="Found empty <%s> element"
|
||||||
COM_JEDCHECKER_MANIFEST_MENU_UNUSED_ATTRIBUTE="Menu item attribute '%s' is not used with 'link' attribute"
|
COM_JEDCHECKER_MANIFEST_MENU_UNUSED_ATTRIBUTE="Menu item attribute '%s' is not used with 'link' attribute"
|
||||||
|
@ -278,6 +278,15 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 3) check empty elements
|
||||||
|
foreach ($node as $child)
|
||||||
|
{
|
||||||
|
if ($child->count() === 0 && (string) $child === '')
|
||||||
|
{
|
||||||
|
$this->infos[] = JText::sprintf('COM_JEDCHECKER_MANIFEST_EMPTY_CHILD', $child->getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extra checks (if exist)
|
// Extra checks (if exist)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user