Skip to content

Commit

Permalink
Consolidate doc block headings.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Oct 31, 2014
1 parent d4eaf22 commit 5e996cd
Show file tree
Hide file tree
Showing 32 changed files with 75 additions and 75 deletions.
6 changes: 3 additions & 3 deletions src/Collection/CollectionInterface.php
Expand Up @@ -53,7 +53,7 @@ public function each(callable $c);
* in the current iteration, the key of the element and this collection as
* arguments, in that order.
*
* ## Example:
* ### Example:
*
* Filtering odd numbers in an array, at the end only the value 2 will
* be present in the resulting collection:
Expand All @@ -79,7 +79,7 @@ public function filter(callable $c = null);
* in the current iteration, the key of the element and this collection as
* arguments, in that order.
*
* ## Example:
* ### Example:
*
* Filtering even numbers in an array, at the end only values 1 and 3 will
* be present in the resulting collection:
Expand Down Expand Up @@ -157,7 +157,7 @@ public function contains($value);
* in the current iteration, the key of the element and this collection as
* arguments, in that order.
*
* ## Example:
* ### Example:
*
* Getting a collection of booleans where true indicates if a person is female:
*
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/Iterator/MapReduce.php
Expand Up @@ -78,7 +78,7 @@ class MapReduce implements IteratorAggregate {
/**
* Constructor
*
* ## Example:
* ### Example:
*
* Separate all unique odd and even numbers in an array
*
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/Iterator/TreeIterator.php
Expand Up @@ -61,7 +61,7 @@ public function __construct(RecursiveIterator $items, $mode = RecursiveIteratorI
* the current element as first parameter, the current iteration key as second
* parameter, and the iterator instance as third argument.
*
* ## Example
* ### Example
*
* {{{
* $printer = (new Collection($treeStructure))->listNested()->printer('name');
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Component.php
Expand Up @@ -23,13 +23,13 @@
* controller logic that can be composed into a controller. Components also
* provide request life-cycle callbacks for injecting logic at specific points.
*
* ## Initialize hook
* ### Initialize hook
*
* Like Controller and Table, this class has an initialize() hook that you can use
* to add custom 'constructor' logic. It is important to remember that each request
* (and sub-request) will only make one instance of any given component.
*
* ## Life cycle callbacks
* ### Life cycle callbacks
*
* Components can provide several callbacks that are fired at various stages of the request
* cycle. The available callbacks are:
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Component/PaginatorComponent.php
Expand Up @@ -65,7 +65,7 @@ public function implementedEvents() {
/**
* Handles automatic pagination of model records.
*
* ## Configuring pagination
* ### Configuring pagination
*
* When calling `paginate()` you can use the $settings parameter to pass in pagination settings.
* These settings are used to build the queries made and control other pagination settings.
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Configure.php
Expand Up @@ -264,7 +264,7 @@ public static function load($key, $config = 'default', $merge = true) {
* 'default' adapter is a PhpConfig, the generated file will be a PHP
* configuration file loadable by the PhpConfig.
*
* ## Usage
* ### Usage
*
* Given that the 'default' engine is an instance of PhpConfig.
* Save all data in Configure to the file `my_config.php`:
Expand Down
4 changes: 2 additions & 2 deletions src/Core/Plugin.php
Expand Up @@ -51,7 +51,7 @@ class Plugin {
* This method does not configure any autoloaders. That must be done separately either
* through composer, or your own code during config/bootstrap.php.
*
* ## Examples:
* ### Examples:
*
* `Plugin::load('DebugKit')`
*
Expand Down Expand Up @@ -91,7 +91,7 @@ class Plugin {
*
* Will only load the bootstrap for ApiGenerator and only the routes for DebugKit
*
* ## Configuration options
* ### Configuration options
*
* - `bootstrap` - array - Whether or not you want the $plugin/config/bootstrap.php file loaded.
* - `routes` - boolean - Whether or not you want to load the $plugin/config/routes.php file.
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Connection.php
Expand Up @@ -438,7 +438,7 @@ public function rollback() {
* If you are trying to enable this feature, make sure you check the return value of this
* function to verify it was enabled successfully.
*
* ## Example:
* ### Example:
*
* `$connection->useSavePoints(true)` Returns true if drivers supports save points, false otherwise
* `$connection->useSavePoints(false)` Disables usage of savepoints and returns false
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Expression/FunctionExpression.php
Expand Up @@ -42,7 +42,7 @@ class FunctionExpression extends QueryExpression {
* By default, all params that are passed will be quoted. If you wish to use
* literal arguments, you need to explicitly hint this function.
*
* ## Examples:
* ### Examples:
*
* ``$f = new FunctionExpression('CONCAT', ['CakePHP', ' rules']);``
*
Expand Down
38 changes: 19 additions & 19 deletions src/Database/Query.php
Expand Up @@ -197,7 +197,7 @@ public function sql(ValueBinder $generator = null) {
* The callback will receive 2 parameters, the first one is the value of the query
* part that is being iterated and the second the name of such part.
*
* ## Example:
* ### Example:
* {{{
* $query->select(['title'])->from('articles')->traverse(function ($value, $clause) {
* if ($clause === 'select') {
Expand Down Expand Up @@ -230,7 +230,7 @@ public function traverse(callable $visitor, array $parts = []) {
* By default this function will append any passed argument to the list of fields
* to be selected, unless the second argument is set to true.
*
* ## Examples:
* ### Examples:
*
* {{{
* $query->select(['id', 'title']); // Produces SELECT id, title
Expand Down Expand Up @@ -275,7 +275,7 @@ public function select($fields = [], $overwrite = false) {
* or set of fields, you may pass an array of fields to filter on. Beware that
* this option might not be fully supported in all database systems.
*
* ## Examples:
* ### Examples:
*
* {{{
* // Filters products with the same name and city
Expand Down Expand Up @@ -355,7 +355,7 @@ public function modifier($modifiers, $overwrite = false) {
*
* This method can be used for select, update and delete statements.
*
* ## Examples:
* ### Examples:
*
* {{{
* $query->from(['p' => 'posts']); // Produces FROM posts p
Expand Down Expand Up @@ -433,7 +433,7 @@ public function from($tables = [], $overwrite = false) {
* // INNER JOIN products p (a.owner_id = p.id)
* }}}
*
* ## Using conditions and types
* ### Using conditions and types
*
* Conditions can be expressed, as in the examples above, using a string for comparing
* columns, or string with already quoted literal values. Additionally it is
Expand All @@ -454,7 +454,7 @@ public function from($tables = [], $overwrite = false) {
* ]], ['a.posted' => 'datetime', 'a.published' => 'boolean'])
* }}}
*
* ## Overwriting joins
* ### Overwriting joins
*
* When creating aliased joins using the array notation, you can override
* previous join definitions by using the same alias in consequent
Expand Down Expand Up @@ -632,7 +632,7 @@ protected function _makeJoin($table, $conditions, $type) {
* Any conditions created with this methods can be used with any SELECT, UPDATE
* and DELETE type of queries.
*
* ## Conditions using operators:
* ### Conditions using operators:
*
* {{{
* $query->where([
Expand All @@ -649,7 +649,7 @@ protected function _makeJoin($table, $conditions, $type) {
* Second parameter is used to specify what type is expected for each passed
* key. Valid types can be used from the mapped with Database\Type class.
*
* ## Nesting conditions with conjunctions:
* ### Nesting conditions with conjunctions:
*
* {{{
* $query->where([
Expand All @@ -674,7 +674,7 @@ protected function _makeJoin($table, $conditions, $type) {
* the AND operator. Also, using the same array key twice in consecutive calls to
* this method will not override the previous value.
*
* ## Using expressions objects:
* ### Using expressions objects:
*
* {{{
* $exp = $query->newExpr()->add(['id !=' => 100, 'author_id' != 1])->type('OR');
Expand All @@ -687,7 +687,7 @@ protected function _makeJoin($table, $conditions, $type) {
*
* Other Query objects that be used as conditions for any field.
*
* ## Adding conditions in multiple steps:
* ### Adding conditions in multiple steps:
*
* You can use callable functions to construct complex expressions, functions
* receive as first argument a new QueryExpression object and this query instance
Expand All @@ -708,7 +708,7 @@ protected function _makeJoin($table, $conditions, $type) {
*
* ``WHERE title != 'Hello World' AND (id = 1 OR (id > 2 AND id < 10))``
*
* ## Conditions as strings:
* ### Conditions as strings:
*
* {{{
* $query->where(['articles.author_id = authors.id', 'modified IS NULL']);
Expand Down Expand Up @@ -755,7 +755,7 @@ public function where($conditions = null, $types = [], $overwrite = false) {
* that each array entry will be joined to the other using the AND operator, unless
* you nest the conditions in the array using other operator.
*
* ## Examples:
* ### Examples:
*
* {{{
* $query->where(['title' => 'Hello World')->andWhere(['author_id' => 1]);
Expand Down Expand Up @@ -816,7 +816,7 @@ public function andWhere($conditions, $types = []) {
* that each array entry will be joined to the other using the OR operator, unless
* you nest the conditions in the array using other operator.
*
* ## Examples:
* ### Examples:
*
* {{{
* $query->where(['title' => 'Hello World')->orWhere(['title' => 'Foo']);
Expand Down Expand Up @@ -874,7 +874,7 @@ public function orWhere($conditions, $types = []) {
* By default this function will append any passed argument to the list of fields
* to be selected, unless the second argument is set to true.
*
* ## Examples:
* ### Examples:
*
* {{{
* $query->order(['title' => 'DESC', 'author_id' => 'ASC']);
Expand Down Expand Up @@ -929,7 +929,7 @@ public function order($fields, $overwrite = false) {
* By default this function will append any passed argument to the list of fields
* to be grouped, unless the second argument is set to true.
*
* ## Examples:
* ### Examples:
*
* {{{
* // Produces GROUP BY id, title
Expand Down Expand Up @@ -1046,7 +1046,7 @@ public function page($num, $limit = null) {
* In some databases, this operation might not be supported or will require
* the query to be transformed in order to limit the result set size.
*
* ## Examples
* ### Examples
*
* {{{
* $query->limit(10) // generates LIMIT 10
Expand All @@ -1073,7 +1073,7 @@ public function limit($num) {
* In some databases, this operation might not be supported or will require
* the query to be transformed in order to limit the result set size.
*
* ## Examples
* ### Examples
*
* {{{
* $query->offset(10) // generates OFFSET 10
Expand All @@ -1100,7 +1100,7 @@ public function offset($num) {
* By default, the UNION operator will remove duplicate rows, if you wish to include
* every row for all queries, use unionAll().
*
* ## Examples
* ### Examples
*
* {{{
* $union = (new Query($conn))->select(['id', 'title'])->from(['a' => 'articles']);
Expand Down Expand Up @@ -1439,7 +1439,7 @@ public function clause($name) {
* If you wish to remove all decorators from the stack, set the first parameter
* to null and the second to true.
*
* ## Example
* ### Example
*
* {{{
* $query->decorateResults(function ($row) {
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Statement/PDOStatement.php
Expand Up @@ -45,7 +45,7 @@ public function __construct(Statement $statement = null, $driver = null) {
*
* It is not allowed to combine positional and named variables in the same statement
*
* ## Examples:
* ### Examples:
*
* {{{
* $statement->bindValue(1, 'a title');
Expand Down Expand Up @@ -74,7 +74,7 @@ public function bindValue($column, $value, $type = 'string') {
* Rows can be fetched to contain columns as names or positions. If no
* rows are left in result set, this method will return false
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand All @@ -99,7 +99,7 @@ public function fetch($type = 'num') {
/**
* Returns an array with all rows resulting from executing this statement
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand Down
12 changes: 6 additions & 6 deletions src/Database/Statement/StatementDecorator.php
Expand Up @@ -75,7 +75,7 @@ public function __get($property) {
*
* It is not allowed to combine positional and named variables in the same statement.
*
* ## Examples:
* ### Examples:
*
* {{{
* $statement->bindValue(1, 'a title');
Expand Down Expand Up @@ -106,7 +106,7 @@ public function closeCursor() {
/**
* Returns the number of columns this statement's results will contain.
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand Down Expand Up @@ -157,7 +157,7 @@ public function execute($params = null) {
* Rows can be fetched to contain columns as names or positions. If no
* rows are left in result set, this method will return false.
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand All @@ -176,7 +176,7 @@ public function fetch($type = 'num') {
/**
* Returns an array with all rows resulting from executing this statement.
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand All @@ -194,7 +194,7 @@ public function fetchAll($type = 'num') {
/**
* Returns the number of rows affected by this SQL statement.
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand All @@ -212,7 +212,7 @@ public function rowCount() {
* Statements are iterable as arrays, this method will return
* the iterator object for traversing all items in the result.
*
* ## Example:
* ### Example:
*
* {{{
* $statement = $connection->prepare('SELECT id, title from articles');
Expand Down

0 comments on commit 5e996cd

Please sign in to comment.