Browse Source

Fixed markdown lists in docblocks

Corey Taylor 6 years ago
parent
commit
594a2c3291

+ 4 - 1
src/Console/Shell.php

@@ -370,9 +370,10 @@ class Shell
      * ```
      *
      * With an array having two key / value pairs:
+     *
      *  - `command` can accept either a string or an array. Represents the command to dispatch
      *  - `extra` can accept an array of extra parameters to pass on to the dispatcher. This
-     *  parameters will be available in the `param` property of the called `Shell`
+     *    parameters will be available in the `param` property of the called `Shell`
      *
      * `return $this->dispatchShell([
      *      'command' => 'schema create DbAcl',
@@ -459,7 +460,9 @@ class Shell
      * @param array $extra Extra parameters that you can manually pass to the Shell
      * to be dispatched.
      * Built-in extra parameter is :
+     *
      * - `requested` : if used, will prevent the Shell welcome message to be displayed
+     *
      * @return int|bool|null
      * @link https://book.cakephp.org/4/en/console-and-shells.html#the-cakephp-console
      */

+ 4 - 0
src/Console/ShellDispatcher.php

@@ -170,7 +170,9 @@ class ShellDispatcher
      * @param array $extra Extra parameters that you can manually pass to the Shell
      * to be dispatched.
      * Built-in extra parameter is :
+     *
      * - `requested` : if used, will prevent the Shell welcome message to be displayed
+     *
      * @return int The cli command exit code. 0 is success.
      */
     public function dispatch(array $extra = []): int
@@ -200,7 +202,9 @@ class ShellDispatcher
      * @param array $extra Extra parameters that you can manually pass to the Shell
      * to be dispatched.
      * Built-in extra parameter is :
+     *
      * - `requested` : if used, will prevent the Shell welcome message to be displayed
+     *
      * @return bool|int|null
      * @throws \Cake\Console\Exception\MissingShellMethodException
      */

+ 1 - 0
src/Database/Connection.php

@@ -121,6 +121,7 @@ class Connection implements ConnectionInterface
      * Constructor.
      *
      * ### Available options:
+     *
      * - `driver` Sort name or FCQN for driver.
      * - `log` Boolean indicating whether to use query logging.
      * - `name` Connection name.

+ 1 - 0
src/Database/Query.php

@@ -981,6 +981,7 @@ class Query implements ExpressionInterface, IteratorAggregate
      * Be careful about using it without proper sanity checks.
      *
      * Options:
+     *
      * - `types` - Associative array of type names used to bind values to query
      * - `allowEmpty` - Allow empty array.
      *

+ 1 - 0
src/Http/Client/Exception/RequestException.php

@@ -24,6 +24,7 @@ use Throwable;
  * Exception for when a request failed.
  *
  * Examples:
+ *
  *   - Request is invalid (e.g. method is missing)
  *   - Runtime request errors (e.g. the body stream is not seekable)
  */

+ 2 - 0
src/Http/Response.php

@@ -430,10 +430,12 @@ class Response implements ResponseInterface
      * Constructor
      *
      * @param array $options list of parameters to setup the response. Possible values are:
+     *
      *  - body: the response text that should be sent to the client
      *  - status: the HTTP status code to respond with
      *  - type: a complete mime-type string or an extension mapped in this class
      *  - charset: the charset for the response body
+     *
      * @throws \InvalidArgumentException
      */
     public function __construct(array $options = [])

+ 2 - 0
src/I18n/FrozenDate.php

@@ -145,10 +145,12 @@ class FrozenDate extends ChronosDate implements I18nDateTimeInterface
      * - `from` => another Date object representing the "now" date
      * - `format` => a fall back format if the relative time is longer than the duration specified by end
      * - `accuracy` => Specifies how accurate the date should be described (array)
+     *
      *    - year =>   The format if years > 0   (default "day")
      *    - month =>  The format if months > 0  (default "day")
      *    - week =>   The format if weeks > 0   (default "day")
      *    - day =>    The format if weeks > 0   (default "day")
+     *
      * - `end` => The end of relative date telling
      * - `relativeString` => The printf compatible string when outputting relative date
      * - `absoluteString` => The printf compatible string when outputting absolute date

+ 2 - 0
src/I18n/FrozenTime.php

@@ -150,6 +150,7 @@ class FrozenTime extends Chronos implements I18nDateTimeInterface
      * - `from` => another Time object representing the "now" time
      * - `format` => a fall back format if the relative time is longer than the duration specified by end
      * - `accuracy` => Specifies how accurate the date should be described (array)
+     *
      *    - year =>   The format if years > 0   (default "day")
      *    - month =>  The format if months > 0  (default "day")
      *    - week =>   The format if weeks > 0   (default "day")
@@ -157,6 +158,7 @@ class FrozenTime extends Chronos implements I18nDateTimeInterface
      *    - hour =>   The format if hours > 0   (default "minute")
      *    - minute => The format if minutes > 0 (default "minute")
      *    - second => The format if seconds > 0 (default "second")
+     *
      * - `end` => The end of relative time telling
      * - `relativeString` => The printf compatible string when outputting relative time
      * - `absoluteString` => The printf compatible string when outputting absolute time

+ 2 - 0
src/I18n/Time.php

@@ -230,6 +230,7 @@ class Time extends MutableDateTime implements I18nDateTimeInterface
      * - `from` => another Time object representing the "now" time
      * - `format` => a fall back format if the relative time is longer than the duration specified by end
      * - `accuracy` => Specifies how accurate the date should be described (array)
+     *
      *    - year =>   The format if years > 0   (default "day")
      *    - month =>  The format if months > 0  (default "day")
      *    - week =>   The format if weeks > 0   (default "day")
@@ -237,6 +238,7 @@ class Time extends MutableDateTime implements I18nDateTimeInterface
      *    - hour =>   The format if hours > 0   (default "minute")
      *    - minute => The format if minutes > 0 (default "minute")
      *    - second => The format if seconds > 0 (default "second")
+     *
      * - `end` => The end of relative time telling
      * - `relativeString` => The `printf` compatible string when outputting relative time
      * - `absoluteString` => The `printf` compatible string when outputting absolute time

+ 1 - 0
src/ORM/Behavior/TranslateBehavior.php

@@ -82,6 +82,7 @@ class TranslateBehavior extends Behavior implements PropertyMarshalInterface
      * Constructor
      *
      * ### Options
+     *
      * - `fields`: List of fields which need to be translated. Providing this fields
      *   list is mandatory when using `EavStrategy`. If the fields list is empty when
      *   using `ShadowTableStrategy` then the list will be auto generated based on

+ 1 - 0
src/ORM/EagerLoader.php

@@ -229,6 +229,7 @@ class EagerLoader
      * `matching` option.
      *
      *  ### Options
+     *
      *  - 'joinType': INNER, OUTER, ...
      *  - 'fields': Fields to contain
      *

+ 2 - 0
src/View/Form/ArrayContext.php

@@ -161,10 +161,12 @@ class ArrayContext implements ContextInterface
      * @param string $field A dot separated path to the field a value
      *   is needed for.
      * @param array $options Options:
+     *
      *   - `default`: Default value to return if no value found in request
      *     data or context record.
      *   - `schemaDefault`: Boolean indicating whether default value from
      *      context's schema should be used if it's not explicitly provided.
+     *
      * @return mixed
      */
     public function val(string $field, array $options = [])

+ 2 - 0
src/View/Form/EntityContext.php

@@ -233,10 +233,12 @@ class EntityContext implements ContextInterface
      *
      * @param string $field The dot separated path to the value.
      * @param array $options Options:
+     *
      *   - `default`: Default value to return if no value found in request
      *     data or entity.
      *   - `schemaDefault`: Boolean indicating whether default value from table
      *     schema should be used if it's not explicitly provided.
+     *
      * @return mixed The value of the field or null on a miss.
      */
     public function val(string $field, array $options = [])

+ 21 - 5
src/View/Helper/BreadcrumbsHelper.php

@@ -63,16 +63,20 @@ class BreadcrumbsHelper extends Helper
      * @param string|array $title If provided as a string, it represents the title of the crumb.
      * Alternatively, if you want to add multiple crumbs at once, you can provide an array, with each values being a
      * single crumb. Arrays are expected to be of this form:
+     *
      * - *title* The title of the crumb
      * - *link* The link of the crumb. If not provided, no link will be made
      * - *options* Options of the crumb. See description of params option of this method.
+     *
      * @param string|array|null $url URL of the crumb. Either a string, an array of route params to pass to
      * Url::build() or null / empty if the crumb does not have a link.
      * @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
      * be rendered in (a <li> tag by default). It accepts two special keys:
+     *
      * - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
-     * the link)
+     *   the link)
      * - *templateVars*: Specific template vars in case you override the templates provided.
+     *
      * @return $this
      */
     public function add($title, $url = null, array $options = [])
@@ -96,16 +100,20 @@ class BreadcrumbsHelper extends Helper
      * @param string|array $title If provided as a string, it represents the title of the crumb.
      * Alternatively, if you want to add multiple crumbs at once, you can provide an array, with each values being a
      * single crumb. Arrays are expected to be of this form:
+     *
      * - *title* The title of the crumb
      * - *link* The link of the crumb. If not provided, no link will be made
      * - *options* Options of the crumb. See description of params option of this method.
+     *
      * @param string|array|null $url URL of the crumb. Either a string, an array of route params to pass to
      * Url::build() or null / empty if the crumb does not have a link.
      * @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
      * be rendered in (a <li> tag by default). It accepts two special keys:
+     *
      * - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
-     * the link)
+     *   the link)
      * - *templateVars*: Specific template vars in case you override the templates provided.
+     *
      * @return $this
      */
     public function prepend($title, $url = null, array $options = [])
@@ -139,9 +147,11 @@ class BreadcrumbsHelper extends Helper
      * Url::build() or null / empty if the crumb does not have a link.
      * @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
      * be rendered in (a <li> tag by default). It accepts two special keys:
+     *
      * - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
-     * the link)
+     *   the link)
      * - *templateVars*: Specific template vars in case you override the templates provided.
+     *
      * @return $this
      * @throws \LogicException In case the index is out of bound
      */
@@ -168,9 +178,11 @@ class BreadcrumbsHelper extends Helper
      * Url::build() or null / empty if the crumb does not have a link.
      * @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
      * be rendered in (a <li> tag by default). It accepts two special keys:
+     *
      * - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
-     * the link)
+     *   the link)
      * - *templateVars*: Specific template vars in case you override the templates provided.
+     *
      * @return $this
      * @throws \LogicException In case the matching crumb can not be found
      */
@@ -197,9 +209,11 @@ class BreadcrumbsHelper extends Helper
      * Url::build() or null / empty if the crumb does not have a link.
      * @param array $options Array of options. These options will be used as attributes HTML attribute the crumb will
      * be rendered in (a <li> tag by default). It accepts two special keys:
+     *
      * - *innerAttrs*: An array that allows you to define attributes for the inner element of the crumb (by default, to
-     * the link)
+     *   the link)
      * - *templateVars*: Specific template vars in case you override the templates provided.
+     *
      * @return $this
      * @throws \LogicException In case the matching crumb can not be found.
      */
@@ -243,9 +257,11 @@ class BreadcrumbsHelper extends Helper
      * allow the insertion of custom template variable in the template.
      * @param array $separator Array of attributes for the `separator` template.
      * Possible properties are :
+     *
      * - *separator* The string to be displayed as a separator
      * - *templateVars* Allows the insertion of custom template variable in the template
      * - *innerAttrs* To provide attributes in case your separator is divided in two elements.
+     *
      * All other properties will be converted as HTML attributes and will replace the *attrs* key in the template.
      * If you use the default for this option (empty), it will not render a separator.
      * @return string The breadcrumbs trail

+ 6 - 0
src/View/Helper/FormHelper.php

@@ -870,11 +870,13 @@ class FormHelper extends Helper
      * @param array $fields An array of customizations for the fields that will be
      *   generated. This array allows you to set custom types, labels, or other options.
      * @param array $options Options array. Valid keys are:
+     *
      * - `fieldset` Set to false to disable the fieldset. You can also pass an array of params to be
      *    applied as HTML attributes to the fieldset tag. If you pass an empty array, the fieldset will
      *    be enabled
      * - `legend` Set to false to disable the legend for the generated control set. Or supply a string
      *    to customize the legend text.
+     *
      * @return string Completed form controls.
      * @link https://book.cakephp.org/4/en/views/helpers/form.html#generating-entire-forms
      */
@@ -906,11 +908,13 @@ class FormHelper extends Helper
      * @param array $fields An array of the fields to generate. This array allows
      *   you to set custom types, labels, or other options.
      * @param array $options Options array. Valid keys are:
+     *
      * - `fieldset` Set to false to disable the fieldset. You can also pass an
      *    array of params to be applied as HTML attributes to the fieldset tag.
      *    If you pass an empty array, the fieldset will be enabled.
      * - `legend` Set to false to disable the legend for the generated input set.
      *    Or supply a string to customize the legend text.
+     *
      * @return string Completed form inputs.
      * @link https://book.cakephp.org/4/en/views/helpers/form.html#generating-entire-forms
      */
@@ -935,11 +939,13 @@ class FormHelper extends Helper
      *
      * @param string $fields the form inputs to wrap in a fieldset
      * @param array $options Options array. Valid keys are:
+     *
      * - `fieldset` Set to false to disable the fieldset. You can also pass an array of params to be
      *    applied as HTML attributes to the fieldset tag. If you pass an empty array, the fieldset will
      *    be enabled
      * - `legend` Set to false to disable the legend for the generated input set. Or supply a string
      *    to customize the legend text.
+     *
      * @return string Completed form inputs.
      */
     public function fieldset(string $fields = '', array $options = []): string

+ 4 - 0
src/View/View.php

@@ -619,15 +619,19 @@ class View implements EventDispatcherInterface
      *   is not found in the plugin, the normal view path cascade will be searched.
      * @param array $data Array of data to be made available to the rendered view (i.e. the Element)
      * @param array $options Array of options. Possible keys are:
+     *
      * - `cache` - Can either be `true`, to enable caching using the config in View::$elementCache. Or an array
      *   If an array, the following keys can be used:
+     *
      *   - `config` - Used to store the cached element in a custom cache configuration.
      *   - `key` - Used to define the key used in the Cache::write(). It will be prefixed with `element_`
+     *
      * - `callbacks` - Set to true to fire beforeRender and afterRender helper callbacks for this element.
      *   Defaults to false.
      * - `ignoreMissing` - Used to allow missing elements. Set to true to not throw exceptions.
      * - `plugin` - setting to false will force to use the application's element from plugin templates, when the
      *   plugin has element with same name. Defaults to true
+     *
      * @return string Rendered Element
      * @throws \Cake\View\Exception\MissingElementException When an element is missing and `ignoreMissing`
      *   is false.

+ 1 - 0
tests/TestCase/Filesystem/FolderTest.php

@@ -1193,6 +1193,7 @@ class FolderTest extends TestCase
     /**
      * Setup filesystem for copy tests
      * $path: folder_test/
+     *
      * - folder1/file1.php
      * - folder1/folderA/fileA.php
      * - folder2/file2.php

+ 1 - 0
tests/TestCase/Http/ServerRequestTest.php

@@ -1800,6 +1800,7 @@ class ServerRequestTest extends TestCase
      * CakePHP gets called with index.php in URL nonetheless.
      *
      * Tests uri with
+     *
      * - index.php/
      * - index.php/
      * - index.php/apples/