Skip to content

Commit

Permalink
Doing a general QA and Docblock
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard3 authored and nateabele committed Aug 15, 2011
1 parent 7b1a6a9 commit 2b7c21d
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 41 deletions.
2 changes: 1 addition & 1 deletion analysis/Docblock.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function tags($string) {
}

/**
* Parses `param` docblock tags to separate out the parameter type from the description.
* Parses `@param` docblock tags to separate out the parameter type from the description.
*
* @param array $params An array of `@param` tags, as parsed from the `tags()` method.
* @return array Returns an array where each key is a parameter name, and each value is an
Expand Down
4 changes: 2 additions & 2 deletions analysis/Inspector.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ function($str) { return preg_quote($str, '/'); },
* - `'ranges'`: Returns a two-dimensional array where each key is a method name,
* and each value is an array of line numbers which are contained in the method.
* @param array $options
* @return array
* @return mixed array|null|object
*/
public static function methods($class, $format = null, array $options = array()) {
$defaults = array('methods' => array(), 'group' => true, 'self' => true);
Expand Down Expand Up @@ -283,7 +283,7 @@ public static function methods($class, $format = null, array $options = array())
* @param array $options Set of options:
* -'self': If true (default), only returns properties defined in `$class`,
* excluding properties from inherited classes.
* @return array
* @return mixed object lithium\analysis\Inspector._items.map|null
*/
public static function properties($class, array $options = array()) {
$defaults = array('properties' => array(), 'self' => true);
Expand Down
1 change: 0 additions & 1 deletion console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class Command extends \lithium\core\Object {

/**
* Constructor.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down
2 changes: 1 addition & 1 deletion console/command/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function _init() {
* @param string $value value of key
* @param boolean|string $options [optional]
* @return mixed Returns all settings if `$key` and `$value` aren't set. The only option for
* `$key` right now is 'server'. Returns the bytes written to the configuration file.
* `$key` right now is 'server'. Returns the bytes written to the configuration file.
*/
public function config($key = null, $value = null, $options = true) {
if (empty($key) || empty($value)) {
Expand Down
1 change: 0 additions & 1 deletion data/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ class Model extends \lithium\core\StaticObject {
/**
* Sets default connection options and connects default finders.
*
* @todo Merge in inherited config from AppModel and other parent classes.
* @param array $options
* @return void
*/
Expand Down
1 change: 0 additions & 1 deletion data/model/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class Query extends \lithium\core\Object {
* This means that any information may be passed into the constructor may be used by the backend
* data source executing the query (or ignored, if support is not implemented). This is useful
* if, for example, you wish to extend a core data source and implement custom fucntionality.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down
1 change: 0 additions & 1 deletion data/source/http/adapter/CouchDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ class CouchDb extends \lithium\data\source\Http {

/**
* Constructor.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down
1 change: 0 additions & 1 deletion net/http/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class Service extends \lithium\core\Object {
/**
* Initializes a new `Service` instance with the default HTTP request settings and
* transport- and format-handling classes.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down
1 change: 0 additions & 1 deletion template/view/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ abstract public function render($template, $data = array(), array $options = arr
* - `response`: The `Response` object associated with this renderer.
* - `context`: An array of the current rendering context data, including `content`,
* `title`, `scripts`, `head` and `styles`.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down
1 change: 0 additions & 1 deletion test/Unit.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ public function assertPattern($expected, $result, $message = '{:message}') {
* @param string $string An HTML/XHTML/XML string
* @param array $expected An array, see above
* @return boolean
* @access public
*/
function assertTags($string, $expected) {
$regex = array();
Expand Down
1 change: 1 addition & 0 deletions tests/cases/util/StringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ public function testRandom64Generator() {

/**
* Tests hash generation using `String::hash()`.
* @return string
*/
public function testHash() {
$salt = 'Salt and pepper';
Expand Down
29 changes: 0 additions & 29 deletions tests/cases/util/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ function setUp() {
/**
* Tests static method call routing to enable patterns defined in Validator::$_rules to be
* called as methods.
*
* @return void
*/
public function testCustomMethodDispatching() {
$this->assertTrue(Validator::isRegex('/^abc$/'));
Expand Down Expand Up @@ -65,8 +63,6 @@ public function testFieldOption() {

/**
* Tests that new methods can be called on Validator by adding rules using Validator::add().
*
* @return void
*/
public function testAddCustomRegexMethods() {
$this->assertNull(Validator::rules('foo'));
Expand All @@ -83,8 +79,6 @@ public function testAddCustomRegexMethods() {

/**
* Tests that the rules state is reset when calling `Validator::__init()`.
*
* @return void
*/
public function testStateReset() {
$this->assertNull(Validator::rules('foo'));
Expand All @@ -98,8 +92,6 @@ public function testStateReset() {

/**
* Tests that valid and invalid UUIDs are properly detected.
*
* @return void
*/
public function testUuid() {
$this->assertTrue(Validator::isUuid('1c0a5830-6025-11de-8a39-0800200c9a66'));
Expand Down Expand Up @@ -130,8 +122,6 @@ public function testCustomWithFormat() {

/**
* Tests that new formats can be added to existing regex methods using Validator::add().
*
* @return void
*/
public function testAddCustomRegexFormats() {
$this->assertTrue(Validator::isPhone('1234567890'));
Expand All @@ -148,8 +138,6 @@ public function testAddCustomRegexFormats() {
/**
* Tests that setting the `'contain'` rule option to false correctly requires a string to be
* an exact match of the regex, with no additional characters outside.
*
* @return void
*/
public function testRegexContainment() {
$this->assertTrue(Validator::isIp('127.0.0.1', null, array('contains' => false)));
Expand Down Expand Up @@ -199,8 +187,6 @@ public function testPrefilterMethodAccess() {

/**
* Tests that the 'notEmpty' rule validates correct values
*
* @return void
*/
public function testNotEmptyRule() {
$this->assertTrue(Validator::isNotEmpty('abcdefg'));
Expand All @@ -216,8 +202,6 @@ public function testNotEmptyRule() {

/**
* Tests the the 'alphaNumeric' rule validates correct values.
*
* @return void
*/
public function testAlphaNumeric() {
$this->assertTrue(Validator::isAlphaNumeric('frferrf'));
Expand All @@ -242,8 +226,6 @@ public function testAlphaNumeric() {

/**
* Tests the the 'lengthBetween' rule validates correct values.
*
* @return void
*/
public function testIsLengthBetweenRule() {
$this->assertTrue(Validator::isLengthBetween('abcde', null, array('min' => 1, 'max' => 7)));
Expand Down Expand Up @@ -275,8 +257,6 @@ public function testBooleanValidation() {

/**
* Test basic decimal number validation.
*
* @return void
*/
function testDecimal() {
$this->assertTrue(Validator::isDecimal('0.0'));
Expand All @@ -299,9 +279,6 @@ function testDecimal() {

/**
* Test decimal validation with precision specified.
*
* @access public
* @return void
*/
public function testDecimalWithPlaces() {
$this->assertTrue(Validator::isDecimal('.27', null, array('precision' => '2')));
Expand Down Expand Up @@ -408,8 +385,6 @@ public function testEmailValidation() {

/**
* Tests email address validation, with additional hostname lookup
*
* @return void
*/
public function testEmailDomainCheck() {
$message = "No internet connection established.";
Expand All @@ -424,8 +399,6 @@ public function testEmailDomainCheck() {

/**
* Tests 'inList' validation.
*
* @return void
*/
function testInList() {
$this->assertTrue(Validator::isInList('one', null, array('list' => array('one', 'two'))));
Expand All @@ -436,8 +409,6 @@ function testInList() {

/**
* Tests credit card validation for numbers in various vendors' formats.
*
* @return void
*/
public function testCreditCardValidation() {

Expand Down
1 change: 0 additions & 1 deletion tests/mocks/storage/cache/strategy/MockConfigurizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class MockConfigurizer extends \lithium\core\Object {

/**
* Constructor.
*
* @param array $config
*/
public function __construct(array $config = array()) {
Expand Down

0 comments on commit 2b7c21d

Please sign in to comment.