Skip to content

Commit

Permalink
Merge pull request #35 from nonumber/patch-1
Browse files Browse the repository at this point in the history
[codestyle] Fixed first letter casing in method names
  • Loading branch information
mbabker committed Jul 23, 2015
2 parents 01fba95 + 4e4aacf commit cdd9200
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
22 changes: 11 additions & 11 deletions Tests/LanguageTest.php
Expand Up @@ -1239,21 +1239,21 @@ public function testGetTag()
/**
* Test...
*
* @covers Joomla\Language\Language::isRTL
* @covers Joomla\Language\Language::isRtl
*
* @return void
*
* @since 1.0
*/
public function testIsRTL()
public function testisRtl()
{
$this->assertFalse(
$this->object->isRTL()
$this->object->isRtl()
);

TestHelper::setValue($this->object, 'metadata', array('rtl' => true));
$this->assertTrue(
$this->object->isRTL()
$this->object->isRtl()
);
}

Expand Down Expand Up @@ -1642,13 +1642,13 @@ public function testParseLanguageFiles()
/**
* Test...
*
* @covers Joomla\Language\Language::parseXMLLanguageFile
* @covers Joomla\Language\Language::parseXmlLanguageFile
*
* @return void
*
* @since 1.0
*/
public function testParseXMLLanguageFile()
public function testParseXmlLanguageFile()
{
$option = array(
'name' => 'English (United Kingdom)',
Expand All @@ -1662,32 +1662,32 @@ public function testParseXMLLanguageFile()

$this->assertEquals(
$option,
Language::parseXMLLanguageFile($path),
Language::parseXmlLanguageFile($path),
'Line: ' . __LINE__
);

$path2 = __DIR__ . '/data/language/es-ES/es-ES.xml';
$this->assertEquals(
$option,
Language::parseXMLLanguageFile($path),
Language::parseXmlLanguageFile($path),
'Line: ' . __LINE__
);
}

/**
* Test...
*
* @covers Joomla\Language\Language::parseXMLLanguageFile
* @covers Joomla\Language\Language::parseXmlLanguageFile
* @expectedException RuntimeException
*
* @return void
*
* @since 1.0
*/
public function testParseXMLLanguageFileException()
public function testParseXmlLanguageFileException()
{
$path = __DIR__ . '/data/language/es-ES/es-ES.xml';

Language::parseXMLLanguageFile($path);
Language::parseXmlLanguageFile($path);
}
}
8 changes: 4 additions & 4 deletions src/Language.php
Expand Up @@ -1093,7 +1093,7 @@ public function getTag()
*
* @since 1.0
*/
public function isRTL()
public function isRtl()
{
return (bool) $this->metadata['rtl'];
}
Expand Down Expand Up @@ -1216,7 +1216,7 @@ public static function getMetadata($lang)

if (is_file("$path/$file"))
{
$result = self::parseXMLLanguageFile("$path/$file");
$result = self::parseXmlLanguageFile("$path/$file");
}

if (empty($result))
Expand Down Expand Up @@ -1364,7 +1364,7 @@ public static function parseLanguageFiles($dir = null)

try
{
$metadata = self::parseXMLLanguageFile($file->getRealPath());
$metadata = self::parseXmlLanguageFile($file->getRealPath());

if ($metadata)
{
Expand Down Expand Up @@ -1392,7 +1392,7 @@ public static function parseLanguageFiles($dir = null)
* @since 1.0
* @throws \RuntimeException
*/
public static function parseXMLLanguageFile($path)
public static function parseXmlLanguageFile($path)
{
if (!is_readable($path))
{
Expand Down

0 comments on commit cdd9200

Please sign in to comment.