Skip to content
This repository has been archived by the owner on Nov 26, 2017. It is now read-only.

Commit

Permalink
CodeSniff on base libraries files
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Dec 2, 2011
1 parent df40289 commit 608c1da
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
3 changes: 2 additions & 1 deletion build.xml
Expand Up @@ -83,7 +83,8 @@
<arg value="--report=checkstyle" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
<arg path="${source}/joomla" />
<arg value="--ignore=${source}/phpmailer,${source}/phputf8,${source}/simplepie/${source}/config.example.php" />
<arg path="${source}" />
</exec>
</target>

Expand Down
6 changes: 3 additions & 3 deletions libraries/import.php
@@ -1,9 +1,9 @@
<?php
/**
* @package Joomla.Platform
* @package Joomla.Platform
*
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

// Set the platform root path as a constant if necessary.
Expand Down
20 changes: 10 additions & 10 deletions libraries/loader.php
@@ -1,9 +1,9 @@
<?php
/**
* @package Joomla.Platform
* @package Joomla.Platform
*
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;
Expand Down Expand Up @@ -74,7 +74,7 @@ public static function discover($classPrefix, $parentPath, $force = true, $recur
// Register the class with the autoloader if not already registered or the force flag is set.
if (empty(self::$classes[$class]) || $force)
{
JLoader::register($class, $file->getPath().'/'.$fileName);
JLoader::register($class, $file->getPath() . '/' . $fileName);
}
}
}
Expand All @@ -100,8 +100,8 @@ public static function getClassList()
/**
* Loads a class from specified directories.
*
* @param string $key The class name to look for (dot notation).
* @param string $base Search this directory for the class.
* @param string $key The class name to look for (dot notation).
* @param string $base Search this directory for the class.
*
* @return boolean True on success.
*
Expand Down Expand Up @@ -168,7 +168,7 @@ public static function import($key, $base = null)
/**
* Load the file for a class.
*
* @param string $class The class to be loaded.
* @param string $class The class to be loaded.
*
* @return boolean True on success
*
Expand Down Expand Up @@ -241,7 +241,7 @@ public static function setup()
/**
* Autoload a Joomla Platform class based on name.
*
* @param string $class The class to be loaded.
* @param string $class The class to be loaded.
*
* @return void
*
Expand All @@ -253,7 +253,7 @@ private static function _autoload($class)
if ($class[0] == 'J')
{
// Split the class name (without the J) into parts separated by camelCase.
$parts = preg_split('/(?<=[a-z])(?=[A-Z])/x',substr($class, 1));
$parts = preg_split('/(?<=[a-z])(?=[A-Z])/x', substr($class, 1));

// If there is only one part we want to duplicate that part for generating the path.
$parts = (count($parts) === 1) ? array($parts[0], $parts[0]) : $parts;
Expand Down Expand Up @@ -290,7 +290,7 @@ function jexit($message = 0)
/**
* Intelligent file importer.
*
* @param string $path A dot syntax path.
* @param string $path A dot syntax path.
*
* @return boolean True on success.
*
Expand Down
6 changes: 3 additions & 3 deletions libraries/platform.php
@@ -1,9 +1,9 @@
<?php
/**
* @package Joomla.Platform
* @package Joomla.Platform
*
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/

defined('JPATH_PLATFORM') or die;
Expand Down

0 comments on commit 608c1da

Please sign in to comment.