Skip to content

Commit

Permalink
Reorganize.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Jan 22, 2009
1 parent 16288cd commit 5621f6a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 18 deletions.
10 changes: 5 additions & 5 deletions PHPLOC/Command.php → PHPLOC/TextUI/Command.php
Expand Up @@ -42,8 +42,8 @@
*/

require 'PHPLOC/Analyser.php';
require 'PHPLOC/Getopt.php';
require 'PHPLOC/FilterIterator.php';
require 'PHPLOC/TextUI/Getopt.php';
require 'PHPLOC/Util/FilterIterator.php';

/**
*
Expand All @@ -55,14 +55,14 @@
* @link
* @since Class available since Release 1.0.0
*/
class PHPLOC_Command
class PHPLOC_TextUI_Command
{
private static $opcodeBlacklist = array('ZEND_NOP');

public static function main()
{
try {
$options = PHPLOC_Getopt::getopt(
$options = PHPLOC_TextUI_Getopt::getopt(
$_SERVER['argv'],
'',
array(
Expand Down Expand Up @@ -103,7 +103,7 @@ public static function main()

if (isset($options[1][0])) {
if (is_dir($options[1][0])) {
$files = new PHPLOC_FilterIterator(
$files = new PHPLOC_Util_FilterIterator(
new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($options[1][0])
),
Expand Down
2 changes: 1 addition & 1 deletion PHPLOC/Getopt.php → PHPLOC/TextUI/Getopt.php
Expand Up @@ -52,7 +52,7 @@
* @link
* @since Class available since Release 1.0.0
*/
class PHPLOC_Getopt {
class PHPLOC_TextUI_Getopt {
public static function getopt(array $args, $short_options, $long_options = NULL)
{
if (empty($args)) {
Expand Down
Expand Up @@ -51,7 +51,7 @@
* @link
* @since Class available since Release 1.0.0
*/
class PHPLOC_FilterIterator extends FilterIterator
class PHPLOC_Util_FilterIterator extends FilterIterator
{
/**
* @var array
Expand Down
22 changes: 13 additions & 9 deletions package.xml
Expand Up @@ -31,18 +31,22 @@
<contents>
<dir name="/">
<dir name="PHPLOC">
<dir name="TextUI">
<file baseinstalldir="/" name="Command.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" name="Getopt.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir>
<dir name="Util">
<file baseinstalldir="/" name="FilterIterator.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir>
<file baseinstalldir="/" name="Analyser.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" name="Command.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" name="FilterIterator.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
<file baseinstalldir="/" name="Getopt.php" role="php">
<tasks:replace from="@package_version@" to="version" type="package-info" />
</file>
</dir>
<file baseinstalldir="/" name="phploc.php" role="script">
<tasks:replace from="/usr/bin/env php" to="php_bin" type="pear-config"/>
Expand Down
4 changes: 2 additions & 2 deletions phploc.php
Expand Up @@ -46,6 +46,6 @@
set_include_path(dirname(__FILE__) . PATH_SEPARATOR . get_include_path());
}

require 'PHPLOC/Command.php';
require 'PHPLOC/TextUI/Command.php';

PHPLOC_Command::main();
PHPLOC_TextUI_Command::main();

0 comments on commit 5621f6a

Please sign in to comment.