Skip to content
This repository
Browse code

Ensuring `@filter` tags are present in docblocks that support filteri…

…ng. Adding misc. docblocks to methods missing them.
  • Loading branch information...
commit 59cb73565e3fb87a330ed54257b366c76583e63e 1 parent 5b1f99e
Nate Abele nateabele authored
16 libraries/lithium/action/Dispatcher.php
@@ -101,6 +101,7 @@ public static function config(array $config = array()) {
101 101 * `Dispatcher::_callable()`, which is either a string or an instance of
102 102 * `lithium\action\Response`.
103 103 * @todo Add exception-handling/error page rendering
  104 + * @filter
104 105 */
105 106 public static function run($request, array $options = array()) {
106 107 $router = static::$_classes['router'];
@@ -184,6 +185,7 @@ public static function applyRules(&$params) {
184 185 * @param array $params The parameter array generated by routing the request.
185 186 * @param array $options Not currently implemented.
186 187 * @return object Returns a callable object which the request will be routed to.
  188 + * @filter
187 189 */
188 190 protected static function _callable($request, $params, $options) {
189 191 $params = compact('request', 'params', 'options');
@@ -200,6 +202,20 @@ protected static function _callable($request, $params, $options) {
200 202 });
201 203 }
202 204
  205 + /**
  206 + * Invokes the callable object returned by `_callable()`, and returns the results, usually a
  207 + * `Response` object instance.
  208 + *
  209 + * @see lithium\action
  210 + * @param object $callable Typically a closure or instance of `lithium\action\Controller`.
  211 + * @param object $request An instance of `lithium\action\Request`.
  212 + * @param array $params An array of parameters to pass to `$callable`, along with `$request`.
  213 + * @return mixed Returns the return value of `$callable`, usually an instance of
  214 + * `lithium\action\Response`.
  215 + * @throws lithium\action\DispatchException Throws an exception if `$callable` is not a
  216 + * `Closure`, or does not declare the PHP magic `__invoke()` method.
  217 + * @filter
  218 + */
203 219 protected static function _call($callable, $request, $params) {
204 220 $params = compact('callable', 'request', 'params');
205 221 return static::_filter(__FUNCTION__, $params, function($self, $params) {
1  libraries/lithium/analysis/Logger.php
@@ -96,6 +96,7 @@ class Logger extends \lithium\core\Adaptable {
96 96 * failed.
97 97 * @throws UnexpectedValueException If the value of `$priority` is not a defined priority value,
98 98 * an `UnexpectedValueException` will be thrown.
  99 + * @filter
99 100 */
100 101 public static function write($priority, $message, array $options = array()) {
101 102 $defaults = array('name' => null);
3  libraries/lithium/console/Dispatcher.php
@@ -75,6 +75,7 @@ public static function config($config = array()) {
75 75 * `null`, an instance will be created.
76 76 * @param array $options
77 77 * @return object The command action result which is an instance of `lithium\console\Response`.
  78 + * @filter
78 79 */
79 80 public static function run($request = null, $options = array()) {
80 81 $defaults = array('request' => array());
@@ -109,6 +110,7 @@ public static function run($request = null, $options = array()) {
109 110 * @param string $params
110 111 * @param string $options
111 112 * @return class lithium\console\Command
  113 + * @filter
112 114 */
113 115 protected static function _callable($request, $params, $options) {
114 116 $params = compact('request', 'params', 'options');
@@ -164,6 +166,7 @@ public static function applyRules($params) {
164 166 * @param string $request
165 167 * @param string $params
166 168 * @return void
  169 + * @filter
167 170 */
168 171 protected static function _call($callable, $request, $params) {
169 172 $params = compact('callable', 'request', 'params');
6 libraries/lithium/data/Model.php
@@ -653,6 +653,7 @@ public static function hasField($field) {
653 653 * @return object Returns a new, _un-saved_ record or document object. In addition to the values
654 654 * passed to `$data`, the object will also contain any values assigned to the
655 655 * `'default'` key of each field defined in `$_schema`.
  656 + * @filter
656 657 */
657 658 public static function create(array $data = array(), array $options = array()) {
658 659 $self = static::_object();
@@ -729,6 +730,7 @@ public static function create(array $data = array(), array $options = array()) {
729 730 * record.
730 731 *
731 732 * @return boolean Returns `true` on a successful save operation, `false` on failure.
  733 + * @filter
732 734 */
733 735 public function save($entity, $data = null, array $options = array()) {
734 736 $self = static::_object();
@@ -813,6 +815,7 @@ public function save($entity, $data = null, array $options = array()) {
813 815 * @return boolean Returns `true` if all validation rules on all fields succeed, otherwise
814 816 * `false`. After validation, the messages for any validation failures are assigned to
815 817 * the entity, and accessible through the `errors()` method of the entity object.
  818 + * @filter
816 819 */
817 820 public function validates($entity, array $options = array()) {
818 821 $defaults = array(
@@ -844,6 +847,7 @@ public function validates($entity, array $options = array()) {
844 847 * @param object $entity Entity to delete.
845 848 * @param array $options Options.
846 849 * @return boolean Success.
  850 + * @filter
847 851 */
848 852 public function delete($entity, array $options = array()) {
849 853 $self = static::_object();
@@ -871,6 +875,7 @@ public function delete($entity, array $options = array()) {
871 875 * the `delete()` method of the corresponding backend database for available
872 876 * options.
873 877 * @return boolean Returns `true` if the update operation succeeded, otherwise `false`.
  878 + * @filter
874 879 */
875 880 public static function update($data, $conditions = array(), array $options = array()) {
876 881 $self = static::_object();
@@ -897,6 +902,7 @@ public static function update($data, $conditions = array(), array $options = arr
897 902 * the `delete()` method of the corresponding backend database for available
898 903 * options.
899 904 * @return boolean Returns `true` if the remove operation succeeded, otherwise `false`.
  905 + * @filter
900 906 */
901 907 public static function remove($conditions = array(), array $options = array()) {
902 908 $self = static::_object();
2  libraries/lithium/data/source/Database.php
@@ -293,6 +293,7 @@ public function read($query, array $options = array()) {
293 293 * @param object $query A `lithium\data\model\Query` object
294 294 * @param array $options none
295 295 * @return boolean
  296 + * @filter
296 297 */
297 298 public function update($query, array $options = array()) {
298 299 return $this->_filter(__METHOD__, compact('query', 'options'), function($self, $params) {
@@ -318,6 +319,7 @@ public function update($query, array $options = array()) {
318 319 * parameter values to be inserted into the query.
319 320 * @return boolean Returns `true` on successful query execution (not necessarily if records are
320 321 * deleted), otherwise `false`.
  322 + * @filter
321 323 */
322 324 public function delete($query, array $options = array()) {
323 325 return $this->_filter(__METHOD__, compact('query', 'options'), function($self, $params) {
5 libraries/lithium/data/source/Http.php
@@ -108,6 +108,7 @@ public function __get($property) {
108 108 * @param string $method
109 109 * @param array $params
110 110 * @return mixed
  111 + * @filter
111 112 */
112 113 public function __call($method, $params) {
113 114 if (isset($this->_config['methods'][$method])) {
@@ -180,6 +181,7 @@ public function describe($entity, array $meta = array()) {
180 181 * @param object $query
181 182 * @param array $options
182 183 * @return void
  184 + * @filter
183 185 */
184 186 public function create($query, array $options = array()) {
185 187 $params = compact('query', 'options');
@@ -212,6 +214,7 @@ public function create($query, array $options = array()) {
212 214 * @param object $query
213 215 * @param array $options
214 216 * @return string
  217 + * @filter
215 218 */
216 219 public function read($query, array $options = array()) {
217 220 $params = compact('query', 'options');
@@ -246,6 +249,7 @@ public function read($query, array $options = array()) {
246 249 * @param object $query
247 250 * @param array $options
248 251 * @return string
  252 + * @filter
249 253 */
250 254 public function update($query, array $options = array()) {
251 255 $params = compact('query', 'options');
@@ -278,6 +282,7 @@ public function update($query, array $options = array()) {
278 282 * @param object $query
279 283 * @param array $options
280 284 * @return string
  285 + * @filter
281 286 */
282 287 public function delete($query, array $options = array()) {
283 288 $params = compact('query', 'options');
4 libraries/lithium/data/source/MongoDb.php
@@ -361,6 +361,7 @@ public function schema($query, $resource = null, $context = null) {
361 361 * @param string $query
362 362 * @param string $options
363 363 * @return boolean
  364 + * @filter
364 365 */
365 366 public function create($query, array $options = array()) {
366 367 $defaults = array('safe' => false, 'fsync' => false);
@@ -438,6 +439,7 @@ protected function _saveFile($data) {
438 439 * @param string $query
439 440 * @param string $options
440 441 * @return object
  442 + * @filter
441 443 */
442 444 public function read($query, array $options = array()) {
443 445 $this->_checkConnection();
@@ -492,6 +494,7 @@ protected function _group($group, $args, $options) {
492 494 * @param string $query
493 495 * @param array $options
494 496 * @return boolean
  497 + * @filter
495 498 */
496 499 public function update($query, array $options = array()) {
497 500 $defaults = array('upsert' => false, 'multiple' => true, 'safe' => false, 'fsync' => false);
@@ -535,6 +538,7 @@ public function update($query, array $options = array()) {
535 538 * @param string $query
536 539 * @param string $options
537 540 * @return boolean
  541 + * @filter
538 542 */
539 543 public function delete($query, array $options = array()) {
540 544 $this->_checkConnection();
1  libraries/lithium/data/source/database/adapter/MySql.php
@@ -320,6 +320,7 @@ public function conditions($conditions, $context, array $options = array()) {
320 320 * sends the SQL query query to MySQL without automatically fetching and buffering the
321 321 * result rows as `mysql_query()` does (for less memory usage).
322 322 * @return resource Returns the result resource handle if the query is successful.
  323 + * @filter
323 324 */
324 325 protected function _execute($sql, array $options = array()) {
325 326 $defaults = array('buffered' => true);
1  libraries/lithium/data/source/database/adapter/Sqlite3.php
@@ -280,6 +280,7 @@ public function error() {
280 280 * @param string $sql The sql string to execute
281 281 * @param array $options No available options.
282 282 * @return resource
  283 + * @filter
283 284 */
284 285 protected function _execute($sql, array $options = array()) {
285 286 $params = compact('sql', 'options');
4 libraries/lithium/data/source/http/adapter/CouchDb.php
@@ -175,6 +175,7 @@ public function name($name) {
175 175 * @param string $query
176 176 * @param string $options
177 177 * @return boolean
  178 + * @filter
178 179 */
179 180 public function create($query, array $options = array()) {
180 181 $defaults = array('model' => $query->model());
@@ -211,6 +212,7 @@ public function create($query, array $options = array()) {
211 212 * @param string $query
212 213 * @param string $options
213 214 * @return object
  215 + * @filter
214 216 */
215 217 public function read($query, array $options = array()) {
216 218 $defaults = array('return' => 'resource', 'model' => $query->model());
@@ -258,6 +260,7 @@ public function read($query, array $options = array()) {
258 260 * @param string $query
259 261 * @param string $options
260 262 * @return boolean
  263 + * @filter
261 264 */
262 265 public function update($query, array $options = array()) {
263 266 $params = compact('query', 'options');
@@ -299,6 +302,7 @@ public function update($query, array $options = array()) {
299 302 * @param string $query
300 303 * @param string $options
301 304 * @return boolean
  305 + * @filter
302 306 */
303 307 public function delete($query, array $options = array()) {
304 308 $params = compact('query', 'options');
1  libraries/lithium/net/http/Media.php
@@ -591,6 +591,7 @@ public static function render(&$response, $data = null, array $options = array()
591 591 * @param array $options Any options that will be passed to the `render()` method of the
592 592 * templating object.
593 593 * @return object Returns an instance of a templating object, usually `lithium\template\View`.
  594 + * @filter
594 595 */
595 596 public static function view($handler, $data, &$response = null, array $options = array()) {
596 597 $params = array('response' => &$response) + compact('handler', 'data', 'options');
3  libraries/lithium/security/Auth.php
@@ -102,6 +102,7 @@ protected static function _initConfig($name, $config) {
102 102 * @return array After a successful credential check against the adapter (or a successful
103 103 * lookup against the current session), returns an array of user information from the
104 104 * storage backend used by the configured adapter.
  105 + * @filter
105 106 */
106 107 public static function check($name, $credentials = null, array $options = array()) {
107 108 $defaults = array('checkSession' => true, 'writeSession' => true);
@@ -145,6 +146,7 @@ public static function check($name, $credentials = null, array $options = array(
145 146 * set by the default session configuration for `$name`.
146 147 * @return array Returns the array of data written to the session, or `false` if the adapter
147 148 * rejects the data.
  149 + * @filter
148 150 */
149 151 public static function set($name, $data, array $options = array()) {
150 152 $params = compact('name', 'data', 'options');
@@ -174,6 +176,7 @@ public static function set($name, $data, array $options = array()) {
174 176 * - `'clearSession'` _boolean_: If `true` (the default), session data for the
175 177 * specified configuration is removed, otherwise it is retained.
176 178 * @return void
  179 + * @filter
177 180 */
178 181 public static function clear($name, array $options = array()) {
179 182 $defaults = array('clearSession' => true);
1  libraries/lithium/storage/Session.php
@@ -198,6 +198,7 @@ public static function delete($key, array $options = array()) {
198 198 * session adapters.
199 199 *
200 200 * @param array $options Optional parameters that this method accepts.
  201 + * @filter
201 202 */
202 203 public static function clear(array $options = array()) {
203 204 $defaults = array('name' => null, 'strategies' => true);
3  libraries/lithium/template/View.php
@@ -284,6 +284,9 @@ protected function _conditions($step, $params, $data, $options) {
284 284 return true;
285 285 }
286 286
  287 + /**
  288 + * @filter
  289 + */
287 290 protected function _step(array $step, array $params, array &$data, array &$options = array()) {
288 291 $step += array('path' => null, 'capture' => null);
289 292 $_renderer = $this->_renderer;
2  libraries/lithium/template/helper/Form.php
@@ -251,6 +251,7 @@ public function config(array $config = array()) {
251 251 * the `'action'` or `'url'` options (defaulting to the current page if none is
252 252 * specified), the HTTP method is defined by the `'method'` option, and any HTML
253 253 * attributes passed in `$options`.
  254 + * @filter
254 255 */
255 256 public function create($binding = null, array $options = array()) {
256 257 $request = $this->_context ? $this->_context->request() : null;
@@ -304,6 +305,7 @@ public function create($binding = null, array $options = array()) {
304 305 * object used to generate the corresponding form.
305 306 *
306 307 * @return string Returns a closing `</form>` tag.
  308 + * @filter
307 309 */
308 310 public function end() {
309 311 list(, $options, $template) = $this->_defaults(__FUNCTION__, null, array());
7 libraries/lithium/template/view/Renderer.php
@@ -229,6 +229,13 @@ public function __isset($property) {
229 229 return isset($this->_context[$property]);
230 230 }
231 231
  232 + /**
  233 + * Returns a helper object or context value by name.
  234 + *
  235 + * @param string $property The name of the helper or context value to return.
  236 + * @return mixed
  237 + * @filter
  238 + */
232 239 public function __get($property) {
233 240 $context = $this->_context;
234 241 $helpers = $this->_helpers;
1  libraries/lithium/test/Controller.php
@@ -26,6 +26,7 @@ class Controller extends \lithium\core\Object {
26 26 * @param array $dispatchParams Array of params after being parsed by router.
27 27 * @param array $options Some basic options for this controller.
28 28 * @return string
  29 + * @filter
29 30 */
30 31 public function __invoke($request, $dispatchParams, array $options = array()) {
31 32 $dispatchParamsDefaults = array('args' => array());
1  libraries/lithium/test/Dispatcher.php
@@ -44,6 +44,7 @@ class Dispatcher extends \lithium\core\StaticObject {
44 44 * @return array A compact array of the title, an array of the results, as well
45 45 * as an additional array of the results after the $options['filters']
46 46 * have been applied.
  47 + * @filter
47 48 */
48 49 public static function run($group = null, array $options = array()) {
49 50 $defaults = array(
1  libraries/lithium/test/Report.php
@@ -214,6 +214,7 @@ function($value) { return is_array($value) ? count($value) : $value; }, $stats
214 214 * @param string $data array from `_data()` method
215 215 * @param array $options Array of options (e.g. rendering type)
216 216 * @return string
  217 + * @filter
217 218 */
218 219 public function render($template, $data = array()) {
219 220 $config = $this->_config;
1  libraries/lithium/test/Unit.php
@@ -639,6 +639,7 @@ protected function _result($type, $info, array $options = array()) {
639 639 * @param string $method The name of the test method to run.
640 640 * @param array $options
641 641 * @return void | false
  642 + * @filter
642 643 */
643 644 protected function _runTestMethod($method, $options) {
644 645 try {
1  libraries/lithium/util/Validator.php
@@ -545,6 +545,7 @@ public static function add($name, $rule = null, array $options = array()) {
545 545 * @param string $options
546 546 * @return boolean Returns `true` or `false` indicating whether the validation rule check
547 547 * succeeded or failed.
  548 + * @filter
548 549 */
549 550 public static function rule($rule, $value, $format = 'any', array $options = array()) {
550 551 if (!isset(static::$_rules[$rule])) {

0 comments on commit 59cb735

Please sign in to comment.
Something went wrong with that request. Please try again.