Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[codestyle] Fixed first letter casing in method names #35

Merged
merged 2 commits into from Jul 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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