Skip to content

Commit

Permalink
- renamed some local variables to camelCase
Browse files Browse the repository at this point in the history
- replaced unnecessary strlen condition with !==''
  • Loading branch information
frankmayer committed Dec 30, 2016
1 parent bdd81d5 commit ba1e67d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
18 changes: 9 additions & 9 deletions libraries/cms/installer/manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ abstract class JInstallerManifest
/**
* Constructor
*
* @param string $xmlpath Path to XML manifest file.
* @param string $xmlPath Path to XML manifest file.
*
* @since 3.1
*/
public function __construct($xmlpath = '')
public function __construct($xmlPath = '')
{
// Old and new variables are referenced for B/C
$this->authorEmail = &$this->authoremail;
Expand All @@ -172,30 +172,30 @@ public function __construct($xmlpath = '')
$this->packagerURL = &$this->packagerurl;
$this->fileList = &$this->filelist;

if (strlen($xmlpath))
if ($xmlPath !== '')
{
$this->loadManifestFromXml($xmlpath);
$this->loadManifestFromXml($xmlPath);
}
}

/**
* Load a manifest from a file
*
* @param string $xmlfile Path to file to load
* @param string $xmlFile Path to file to load
*
* @return boolean
*
* @since 3.1
*/
public function loadManifestFromXml($xmlfile)
public function loadManifestFromXml($xmlFile)
{
$this->manifestFile = basename($xmlfile, '.xml');
$this->manifestFile = basename($xmlFile, '.xml');

$xml = simplexml_load_file($xmlfile);
$xml = simplexml_load_file($xmlFile);

if (!$xml)
{
$this->_errors[] = JText::sprintf('JLIB_INSTALLER_ERROR_LOAD_XML', $xmlfile);
$this->_errors[] = JText::sprintf('JLIB_INSTALLER_ERROR_LOAD_XML', $xmlFile);

return false;
}
Expand Down
6 changes: 3 additions & 3 deletions libraries/cms/installer/manifest/library.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ class JInstallerManifestLibrary extends JInstallerManifest
/**
* JInstallerManifestLibrary constructor.
*
* @param string $xmlpath Path to XML manifest file.
* @param string $xmlPath Path to XML manifest file.
*
* @since __DEPLOY_VERSION__
*/
public function __construct($xmlpath = '')
public function __construct($xmlPath = '')
{
// Old and new variables are referenced for B/C
$this->creationDate = &$this->creationdate;
$this->libraryName = &$this->libraryname;

parent::__construct($xmlpath);
parent::__construct($xmlPath);
}

/**
Expand Down
6 changes: 3 additions & 3 deletions libraries/cms/installer/manifest/package.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ class JInstallerManifestPackage extends JInstallerManifest
/**
* JInstallerManifestPackage constructor.
*
* @param string $xmlpath Path to XML manifest file.
* @param string $xmlPath Path to XML manifest file.
*
* @since __DEPLOY_VERSION__
*/
public function __construct($xmlpath = '')
public function __construct($xmlPath = '')
{
// Old and new variables are referenced for B/C
$this->packageName = &$this->packagename;
$this->scriptFile = &$this->scriptfile;

parent::__construct($xmlpath);
parent::__construct($xmlPath);
}

/**
Expand Down

0 comments on commit ba1e67d

Please sign in to comment.