33
2
mirror of https://github.com/joomla-extensions/jedchecker.git synced 2024-11-30 16:53:59 +00:00

fix Joomla codestyle

This commit is contained in:
Denis Ryabov 2021-04-04 15:12:02 +03:00
parent 1e0c1efec4
commit 729d082bd2

View File

@ -160,20 +160,20 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
} }
// Load DTD-like data for this extension type // Load DTD-like data for this extension type
$json_filename = __DIR__ . '/xmlmanifest/dtd_' . $type . '.json'; $jsonFilename = __DIR__ . '/xmlmanifest/dtd_' . $type . '.json';
if (!is_file($json_filename)) if (!is_file($jsonFilename))
{ {
return true; return true;
} }
// warn if method="upgrade" attribute is not found // Warn if method="upgrade" attribute is not found
if ((string) $xml['method'] !== 'upgrade') if ((string) $xml['method'] !== 'upgrade')
{ {
$this->report->addWarning($file, JText::_('COM_JEDCHECKER_MANIFEST_MISSED_METHOD_UPGRADE')); $this->report->addWarning($file, JText::_('COM_JEDCHECKER_MANIFEST_MISSED_METHOD_UPGRADE'));
} }
// check 'client' attribute is "site" or "administrator" (for module/template only) // Check 'client' attribute is "site" or "administrator" (for module/template only)
if ($type === 'module' || $type === 'template') if ($type === 'module' || $type === 'template')
{ {
$client = (string) $xml['client']; $client = (string) $xml['client'];
@ -188,7 +188,7 @@ class JedcheckerRulesXMLManifest extends JEDcheckerRule
} }
} }
$data = json_decode(file_get_contents($json_filename), true); $data = json_decode(file_get_contents($jsonFilename), true);
$this->DTDNodeRules = $data['nodes']; $this->DTDNodeRules = $data['nodes'];
$this->DTDAttrRules = $data['attributes']; $this->DTDAttrRules = $data['attributes'];