e44eb88dbecbe8d95e785c6b2406e1b5e2bf5399
Author: Mark Story
Date: 2009-07-22 23:46:47 -0400
diff --git a/api_generator_app_controller.php b/api_generator_app_controller.php
index 5be89fb..dfc531e 100644
--- a/api_generator_app_controller.php
+++ b/api_generator_app_controller.php
@@ -21,12 +21,12 @@ class ApiGeneratorAppController extends AppController {
/**
* theme
*
- **/
+ **/
public $theme = 'api';
/**
* view
*
- **/
+ **/
public $view = 'Theme';
/**
* beforeFilter callback
@@ -47,7 +47,6 @@ class ApiGeneratorAppController extends AppController {
$localePaths[] = dirname(__FILE__) . DS . 'locale';
Configure::write('localePaths',$localePaths);
}
-
/**
* Error Generating Page.
* Needs to be public for Security Blackhole.
diff --git a/api_generator_app_model.php b/api_generator_app_model.php
index 31837ee..300388a 100644
--- a/api_generator_app_model.php
+++ b/api_generator_app_model.php
@@ -34,7 +34,6 @@ class ApiGeneratorAppModel extends AppModel {
$slugPath = strtolower(Inflector::slug($slashPath, '-'));
return $slugPath;
}
-
/**
* Make a slug
*
diff --git a/controllers/api_files_controller.php b/controllers/api_files_controller.php
index afbda04..ac041fd 100644
--- a/controllers/api_files_controller.php
+++ b/controllers/api_files_controller.php
@@ -42,7 +42,6 @@ class ApiFilesController extends ApiGeneratorAppController {
* @var array
**/
public $helpers = array('ApiGenerator.ApiDoc', 'ApiGenerator.ApiUtils', 'Html', 'Javascript', 'Text');
-
/**
* Extract all the useful config info out of the ApiConfig.
*
@@ -52,7 +51,6 @@ class ApiFilesController extends ApiGeneratorAppController {
$this->set('basePath', $this->path);
$this->set($this->ApiFile->getExclusions());
}
-
/**
* Browse application files and find things you would like to generate API docs for.
*
@@ -67,7 +65,6 @@ class ApiFilesController extends ApiGeneratorAppController {
list($dirs, $files) = $this->ApiFile->read($this->path . $currentPath);
$this->set(compact('dirs', 'files', 'currentPath', 'previousPath'));
}
-
/**
* all_files
*
@@ -80,7 +77,6 @@ class ApiFilesController extends ApiGeneratorAppController {
$files = $this->ApiFile->fileList($this->path);
$this->set('files', $files);
}
-
/**
* View the API docs for all interesting parts in a file.
*
diff --git a/controllers/api_packages_controller.php b/controllers/api_packages_controller.php
index c9e357a..a0d66cd 100644
--- a/controllers/api_packages_controller.php
+++ b/controllers/api_packages_controller.php
@@ -24,21 +24,18 @@ class ApiPackagesController extends ApiGeneratorAppController {
* @var string
*/
public $name = 'ApiPackages';
-
/**
* Components array
*
* @var array
**/
public $components = array('RequestHandler');
-
/**
* Helpers
*
* @var array
**/
public $helpers = array('ApiGenerator.ApiDoc', 'ApiGenerator.ApiUtils', 'Html', 'Javascript', 'Text');
-
/**
* Index of Packages + subpackages.
*
@@ -48,7 +45,6 @@ class ApiPackagesController extends ApiGeneratorAppController {
$packageIndex = $this->ApiPackage->getPackageIndex();
$this->set('packageIndex', $packageIndex);
}
-
/**
* View a package, and all contained classes.
*
diff --git a/models/api_class.php b/models/api_class.php
index 2ccaff9..874927c 100644
--- a/models/api_class.php
+++ b/models/api_class.php
@@ -45,7 +45,6 @@ class ApiClass extends ApiGeneratorAppModel {
)
)
);
-
/**
* belongsTo assoc
*
@@ -79,7 +78,6 @@ class ApiClass extends ApiGeneratorAppModel {
$db = ConnectionManager::getDataSource($this->useDbConfig);
$db->truncate($this->useTable);
}
-
/**
* save the entry in the index for a ClassDocumentor object
*
@@ -127,7 +125,6 @@ class ApiClass extends ApiGeneratorAppModel {
$this->set($data);
return $this->save();
}
-
/**
* Get the class index listing
*
diff --git a/models/api_config.php b/models/api_config.php
index c915bbd..bc28797 100644
--- a/models/api_config.php
+++ b/models/api_config.php
@@ -32,7 +32,6 @@ class ApiConfig extends Object {
* @var string
**/
public $path = null;
-
/**
* Constructor
*
@@ -151,7 +150,6 @@ class ApiConfig extends Object {
}
return $paths[$index];
}
-
/**
* Return data as a config string
*
diff --git a/models/api_file.php b/models/api_file.php
index 4191d53..fa9e135 100644
--- a/models/api_file.php
+++ b/models/api_file.php
@@ -28,98 +28,84 @@ class ApiFile extends Object {
* @var string
*/
public $name = 'ApiFile';
-
/**
* A list of folders to ignore.
*
* @var array
**/
public $excludeDirectories = array();
-
/**
* excludeMethods property
*
* @var array
*/
public $excludeMethods = array();
-
/**
* excludeProperties property
*
* @var array
*/
public $excludeProperties = array();
-
/**
* A list of files to ignore.
*
* @var array
**/
public $excludeFiles = array();
-
/**
* a list of extensions to scan for
*
* @var array
**/
public $allowedExtensions = array();
-
/**
* Array of class dependancies map
*
* @var array
**/
public $dependencyMap = array();
-
/**
* Mappings of funny named classes to files
*
* @var string
**/
public $classMap = array();
-
/**
* A regexp for file names. (will be made case insenstive)
*
* @var string
**/
public $fileRegExp = '[a-z_\-0-9]+';
-
/**
* Folder instance
*
* @var Folder
**/
protected $_Folder;
-
/**
* ApiConfig Model instance
*
* @var object
**/
public $ApiConfig;
-
/**
* Current Extractor instance
*
* @var object
**/
protected $_extractor;
-
/**
* storage for defined classes
*
* @var array
**/
protected $_definedClasses = array();
-
/**
* storage for defined functions
*
* @var array
**/
protected $_definedFunctions = array();
-
/**
* Constructor
*
@@ -131,7 +117,6 @@ class ApiFile extends Object {
$this->_initConfig();
$this->_Folder = new Folder(APP);
}
-
/**
* Read a path and return files and folders not in the excluded Folder list
*
@@ -150,7 +135,6 @@ class ApiFile extends Object {
$this->_filterFiles($contents[1]);
return $contents;
}
-
/**
* Recursive Read a path and return files and folders not in the excluded Folder list
*
@@ -165,7 +149,6 @@ class ApiFile extends Object {
$this->_filterFiles($contents);
return $contents;
}
-
/**
* _filterFiles
*
@@ -188,7 +171,6 @@ class ApiFile extends Object {
}
$fileList = array_values($fileList);
}
-
/**
* remove files that don't match the allowedExtensions
* or are on the excludeFiles list
@@ -216,7 +198,6 @@ class ApiFile extends Object {
}
$fileList = array_values($fileList);
}
-
/**
* Loads the documentation extractor for a given classname.
*
@@ -236,7 +217,6 @@ class ApiFile extends Object {
public function getExtractor() {
return $this->_extractor;
}
-
/**
* Gets the parsed docs from the Extractor
*
@@ -249,7 +229,6 @@ class ApiFile extends Object {
$this->_extractor->getAll();
return $this->_extractor;
}
-
/**
* Load A File and extract docs for all classes contained in that file
*
@@ -285,7 +264,6 @@ class ApiFile extends Object {
}
return $docs;
}
-
/**
* Import the core classes (Controller, View, Helper, Model)
*
@@ -305,7 +283,6 @@ class ApiFile extends Object {
$funcs = get_defined_functions();
$this->_definedFunctions = $funcs['user'];
}
-
/**
* Fetches the class names and functions contained in the target file.
* If first pass misses, a forceParse pass will be run.
@@ -345,7 +322,6 @@ class ApiFile extends Object {
}
return $new;
}
-
/**
* Retrieves the classNames defined in a file.
* Solves issues of reading docs from files that have already been included.
@@ -373,7 +349,6 @@ class ApiFile extends Object {
}
return $foundClasses;
}
-
/**
* Retrieves global function names defined in a file.
* Unlike the class parser which can cheat with regex.
@@ -391,7 +366,6 @@ class ApiFile extends Object {
}
return $foundFuncs;
}
-
/**
* Parses the file for any parent classes required by the file being loaded.
* Attempts to load those files.
@@ -439,7 +413,6 @@ class ApiFile extends Object {
App::import('File', $className, true, array(), $this->classMap[$className]);
}
}
-
/**
* Attempts to solve class dependancies by importing base CakePHP classes
*
@@ -469,7 +442,6 @@ class ApiFile extends Object {
App::import($type, $class);
}
}
-
/**
* Get the Exclusions lists.
*
@@ -483,7 +455,6 @@ class ApiFile extends Object {
}
return $return;
}
-
/**
* Initialize the configuration for ApiFile.
*
diff --git a/models/api_package.php b/models/api_package.php
index df31685..254bdb6 100644
--- a/models/api_package.php
+++ b/models/api_package.php
@@ -26,7 +26,6 @@ class ApiPackage extends ApiGeneratorAppModel {
* @var string
**/
public $name = 'ApiPackage';
-
/**
* actsAs
*
@@ -35,7 +34,6 @@ class ApiPackage extends ApiGeneratorAppModel {
public $actsAs = array(
'Tree'
);
-
/**
* hasMany assocs
*
@@ -51,7 +49,6 @@ class ApiPackage extends ApiGeneratorAppModel {
'foreignKey' => 'parent_id',
)
);
-
/**
* belongsTo assocs
*
@@ -63,7 +60,6 @@ class ApiPackage extends ApiGeneratorAppModel {
'foreignKey' => 'parent_id',
)
);
-
/**
* get the package index tree.
*
@@ -74,7 +70,6 @@ class ApiPackage extends ApiGeneratorAppModel {
'recursive' => -1
));
}
-
/**
* Parse the Package strings out of a docBlock from a ClassDocumentor/FunctionDocumentor.
*
@@ -95,7 +90,6 @@ class ApiPackage extends ApiGeneratorAppModel {
}
return array_values(array_unique($packages));
}
-
/**
* Updates the package tree with new entries if they exist.
* Requires a full package array.
@@ -127,7 +121,6 @@ class ApiPackage extends ApiGeneratorAppModel {
}
return true;
}
-
/**
* Find The last package's id value.
*
diff --git a/tests/cases/helpers/api_doc.test.php b/tests/cases/helpers/api_doc.test.php
index 323a06f..4f45928 100644
--- a/tests/cases/helpers/api_doc.test.php
+++ b/tests/cases/helpers/api_doc.test.php
@@ -50,7 +50,7 @@ class ApiDocHelperTestCase extends CakeTestCase {
$this->assertTrue($this->ApiDoc->inBasePath(__FILE__));
}
/**
- * undocumented function
+ * test fileNameTrimming
*
* @return void
**/
@@ -62,7 +62,6 @@ class ApiDocHelperTestCase extends CakeTestCase {
$expected = 'tests/cases/helpers/api_doc.test.php';
$this->assertEqual($result, $expected, 'Trim path with different bases is not working %s');
}
-
/**
* testFileLink
*
@@ -121,7 +120,6 @@ class ApiDocHelperTestCase extends CakeTestCase {
'/a'
);
$this->assertTags($result, $expected);
-
}
/**
* endTest
diff --git a/tests/cases/models/api_class.test.php b/tests/cases/models/api_class.test.php
index f02ab43..e31e067 100644
--- a/tests/cases/models/api_class.test.php
+++ b/tests/cases/models/api_class.test.php
@@ -87,7 +87,7 @@ class ApiClassSampleClassChild extends ApiClassSampleClass {
**/
class ApiClassTestCase extends CakeTestCase {
/**
- * undocumented class variable
+ * fixtures to use
*
* @var string
**/
@@ -177,7 +177,6 @@ class ApiClassTestCase extends CakeTestCase {
$result = $this->ApiClass->savePseudoClassDocs($docs['function'], $file);
$this->assertTrue($result);
}
-
/**
* test the search implementation
*
@@ -216,7 +215,6 @@ class ApiClassTestCase extends CakeTestCase {
$this->assertTrue($result['debug']['function']['debug'] instanceof FunctionDocumentor);
}
-
/**
* Test that files containing global functions always have the declaredInFile set to the file_name
* in the index
diff --git a/tests/cases/models/api_package.test.php b/tests/cases/models/api_package.test.php
index e86a8be..e6552c8 100644
--- a/tests/cases/models/api_package.test.php
+++ b/tests/cases/models/api_package.test.php
@@ -72,7 +72,6 @@ class ApiPackageTestCase extends CakeTestCase {
unset($this->ApiPackage);
ClassRegistry::flush();
}
-
/**
* test getting the package index tree
*
@@ -84,7 +83,6 @@ class ApiPackageTestCase extends CakeTestCase {
$this->assertFalse(isset($result[0]['ApiClass']), 'ApiClass has snuck in, big queries are happening %s');
$this->assertTrue(isset($result[0]['children']), 'No children, might not be a tree %s');
}
-
/**
* test parsing of @package / @subpackage strings in doc block arrays.
*
@@ -129,7 +127,6 @@ class ApiPackageTestCase extends CakeTestCase {
$expected = array('cake', 'model', 'behavior');
$this->assertEqual($result, $expected, 'Duplicates not removed %s');
}
-
/**
* test updating the package tree and ensure that duplicate named packages do not get inserted.
*
@@ -150,7 +147,6 @@ class ApiPackageTestCase extends CakeTestCase {
$result = $this->ApiPackage->findAllBySlug('model');
$this->assertEqual(count($result), 1, 'Too many model slugs');
}
-
/**
* test that findEndPackageId finds the end package and returns its Id
*
diff --git a/tests/cases/vendors/class_documentor.test.php b/tests/cases/vendors/class_documentor.test.php
index dd1b6cf..1935561 100644
--- a/tests/cases/vendors/class_documentor.test.php
+++ b/tests/cases/vendors/class_documentor.test.php
@@ -29,7 +29,6 @@ App::import('Vendor', 'ApiGenerator.ClassDocumentor');
* @another-tag long value
*/
class SimpleDocumentorSubjectClass extends StdClass implements Countable {
-
/**
* This var is protected
*
@@ -120,7 +119,6 @@ class ClassDocumentorTestCase extends CakeTestCase {
$this->assertEqual($result, $expected);
$this->assertEqual($Docs->classInfo, $expected);
}
-
/**
* Test getting properties and their info
*
diff --git a/vendors/class_documentor.php b/vendors/class_documentor.php
index 804fa36..82a63b7 100644
--- a/vendors/class_documentor.php
+++ b/vendors/class_documentor.php
@@ -95,7 +95,6 @@ class ClassDocumentor extends ReflectionClass {
return $this->classInfo;
}
-
/**
* getProperties
*
diff --git a/vendors/doc_block_analyzer.php b/vendors/doc_block_analyzer.php
index 40af1f3..8dd19cb 100644
--- a/vendors/doc_block_analyzer.php
+++ b/vendors/doc_block_analyzer.php
@@ -28,42 +28,36 @@ class DocBlockAnalyzer {
* @var array
**/
public $rules = array();
-
/**
* Rules classes that are going to be used
*
* @var array
**/
protected $_ruleNames = array();
-
/**
* Final score for analyzation
*
* @var int
**/
public $_finalScore = 0;
-
/**
* Total elements counted this run
*
* @var int
**/
protected $_totalElements = 0;
-
/**
* Running score for the current property
*
* @var int
**/
protected $_contentScore = 0;
-
/**
* Running total of all objects in the current property
*
* @var int
**/
protected $_contentObjectCount = 0;
-
/**
* Default rules
*
@@ -72,14 +66,12 @@ class DocBlockAnalyzer {
protected $_defaultRules = array(
'MissingLink', 'Empty', 'MissingParams', 'IncompleteTags'
);
-
/**
* Current reflection objects being inspected.
*
* @var object
**/
protected $_reflection;
-
/**
* Constructor
*
@@ -195,7 +187,6 @@ class DocBlockAnalyzer {
$results['finalScore'] = ($this->_finalScore / $this->_totalElements);
return $results;
}
-
/**
* Reset the docblock analyzer
*
@@ -207,7 +198,6 @@ class DocBlockAnalyzer {
$this->resetCounts();
return true;
}
-
/**
* Reset the internal counters.
*
@@ -244,7 +234,6 @@ class DocBlockAnalyzer {
$this->_totalElements += $this->_contentObjectCount;
$this->_finalScore += $this->_contentScore;
}
-
/**
* Score an element and generate results.
*
@@ -263,7 +252,6 @@ class DocBlockAnalyzer {
$this->_contentScore += $result['totalScore'];
return $result;
}
-
/**
* _runRules against an element set
*
diff --git a/vendors/docblock_tools.php b/vendors/docblock_tools.php
index 42e12a4..4ce0144 100644
--- a/vendors/docblock_tools.php
+++ b/vendors/docblock_tools.php
@@ -96,7 +96,6 @@ class DocblockTools {
$com['tags'] = $tags;
return $com;
}
-
/**
* Create a string representation of the method signature.
*
diff --git a/vendors/documentor_factory.php b/vendors/documentor_factory.php
index b9553cf..191555b 100644
--- a/vendors/documentor_factory.php
+++ b/vendors/documentor_factory.php
@@ -31,7 +31,6 @@ class DocumentorFactory {
'class' => 'ClassDocumentor',
'function' => 'FunctionDocumentor',
);
-
/**
* Get the correct reflector type for the requested object
*
