Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Doc block fixes.

  • Loading branch information...
commit b1fabe6686c19ea87b5fa5e080439a54ff6443d4 1 parent fd950cc
@markstory markstory authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 src/View/Form/ArrayContext.php
View
15 src/View/Form/ArrayContext.php
@@ -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:
*
@@ -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;
@@ -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) {
@@ -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'])) {
Please sign in to comment.
Something went wrong with that request. Please try again.