Skip to content

Commit

Permalink
Doc block fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Feb 1, 2014
1 parent fd950cc commit b1fabe6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/View/Form/ArrayContext.php
Expand Up @@ -18,9 +18,10 @@
use Cake\Utility\Hash;

/**
* Provides a basic array based context provider for FormHelper
* this adapter is useful in testing or when you have forms backed by
* by simple array data structures.
* Provides a basic array based context provider for FormHelper.
*
* This adapter is useful in testing or when you have forms backed by
* simple array data structures.
*
* Important keys:
*
Expand Down Expand Up @@ -110,12 +111,12 @@ public function isRequired($field) {
* Get the abstract field type for a given field name.
*
* @param string $field A dot separated path to get a schema type for.
* @return string An abstract data type.
* @return null|string An abstract data type or null.
* @see Cake\Database\Type
*/
public function type($field) {
if (!is_array($this->_context['schema'])) {
return false;
return null;
}
$schema = Hash::get($this->_context['schema'], $field);
return isset($schema['type']) ? $schema['type'] : null;
Expand All @@ -124,7 +125,7 @@ public function type($field) {
/**
* Get an associative array of other attributes for a field name.
*
* @param string $field A dot separated path to get a additional data on.
* @param string $field A dot separated path to get additional data on.
* @return array An array of data describing the additional attributes on a field.
*/
public function attributes($field) {
Expand Down Expand Up @@ -154,7 +155,7 @@ public function hasError($field) {
*
* @param string $field A dot separated path to check errors on.
* @return mixed Either a string or an array of errors. Null
* will be returned when the field path is undefined.
* will be returned when the field path is undefined.
*/
public function error($field) {
if (empty($this->_context['errors'])) {
Expand Down

0 comments on commit b1fabe6

Please sign in to comment.