Skip to content

Commit

Permalink
Fixes formating and whitespace in the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pjio committed Apr 15, 2020
1 parent 6596559 commit ecc4250
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions user_guide_src/source/cli/cli_library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ to STDERR, instead of STDOUT, like ``write()`` and ``color()`` do. This can be u
for errors so they don't have to sift through all of the information, only the actual error messages. You use it
exactly as you would the ``write()`` method::

CLI::error('Cannot write to file: '. $file);
CLI::error('Cannot write to file: ' . $file);

**wrap()**

Expand Down Expand Up @@ -170,11 +170,11 @@ every line after the first line, so that you will have a crisp column edge on th
{
CLI::write(
// Display the title on the left of the row
$title[$i].' '.
$title[$i] . ' ' .
// Wrap the descriptions in a right-hand column
// with its left side 3 characters wider than
// the longest item on the left.
CLI::wrap($descriptions[$i], 40, $maxlen+3)
CLI::wrap($descriptions[$i], 40, $maxlen + 3)
);
}

Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/database/query_builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ searches.

::

$builder->like('title', 'match', 'before'); // Produces: WHERE `title` LIKE '%match' ESCAPE '!'
$builder->like('title', 'match', 'after'); // Produces: WHERE `title` LIKE 'match%' ESCAPE '!'
$builder->like('title', 'match', 'both'); // Produces: WHERE `title` LIKE '%match%' ESCAPE '!'
$builder->like('title', 'match', 'before'); // Produces: WHERE `title` LIKE '%match' ESCAPE '!'
$builder->like('title', 'match', 'after'); // Produces: WHERE `title` LIKE 'match%' ESCAPE '!'
$builder->like('title', 'match', 'both'); // Produces: WHERE `title` LIKE '%match%' ESCAPE '!'

#. **Associative array method:**

Expand Down
8 changes: 4 additions & 4 deletions user_guide_src/source/database/results.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ it returns the current row and moves the internal data pointer ahead.
You can optionally pass 'object' (default) or 'array' in order to specify
the returned value's type::

$query->getUnbufferedRow(); // object
$query->getUnbufferedRow('object'); // object
$query->getUnbufferedRow('array'); // associative array
$query->getUnbufferedRow(); // object
$query->getUnbufferedRow('object'); // object
$query->getUnbufferedRow('array'); // associative array

*********************
Custom Result Objects
Expand Down Expand Up @@ -251,7 +251,7 @@ Example::

if (isset($row))
{
echo $row->email; // access attributes
echo $row->email; // access attributes
echo $row->last_login('Y-m-d'); // access class methods
}

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/helpers/text_helper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,13 @@ The following functions are available:
after each other. Example::

$string = "Fred, Bill,, Joe, Jimmy";
$string = reduce_multiples($string,","); //results in "Fred, Bill, Joe, Jimmy"
$string = reduce_multiples($string, ","); // results in "Fred, Bill, Joe, Jimmy"

If the third parameter is set to TRUE it will remove occurrences of the
character at the beginning and the end of the string. Example::

$string = ",Fred, Bill,, Joe, Jimmy,";
$string = reduce_multiples($string, ", ", TRUE); //results in "Fred, Bill, Joe, Jimmy"
$string = reduce_multiples($string, ", ", TRUE); // results in "Fred, Bill, Joe, Jimmy"

.. php:function:: quotes_to_entities($str)
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/outgoing/response.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ HTTP Caching
============

Built into the HTTP specification are tools help the client (often the web browser) cache the results. Used correctly,
this can lend a huge performance boost to your application because it will tell the client that they don't need
this can lead to a huge performance boost to your application because it will tell the client that they don't need
to contact the getServer at all since nothing has changed. And you can't get faster than that.

This are handled through the ``Cache-Control`` and ``ETag`` headers. This guide is not the proper place for a thorough
Expand Down
60 changes: 30 additions & 30 deletions user_guide_src/source/outgoing/table.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ method described in the function reference below).

$table = new \CodeIgniter\View\Table();

$data = array(
array('Name', 'Color', 'Size'),
array('Fred', 'Blue', 'Small'),
array('Mary', 'Red', 'Large'),
array('John', 'Green', 'Medium')
);
$data = [
['Name', 'Color', 'Size'],
['Fred', 'Blue', 'Small'],
['Mary', 'Red', 'Large'],
['John', 'Green', 'Medium'],
];

echo $table->generate($data);

Expand Down Expand Up @@ -91,38 +91,38 @@ The Table Class permits you to set a table template with which you can
specify the design of your layout. Here is the template prototype::

$template = [
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',

'thead_open' => '<thead>',
'thead_close' => '</thead>',
'thead_open' => '<thead>',
'thead_close' => '</thead>',

'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',

'tfoot_open' => '<tfoot>',
'tfoot_close' => '</tfoot>',
'tfoot_open' => '<tfoot>',
'tfoot_close' => '</tfoot>',

'footing_row_start' => '<tr>',
'footing_row_end' => '</tr>',
'footing_cell_start' => '<td>',
'footing_cell_end' => '</td>',
'footing_row_start' => '<tr>',
'footing_row_end' => '</tr>',
'footing_cell_start' => '<td>',
'footing_cell_end' => '</td>',

'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',

'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',

'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',

'table_close' => '</table>'
'table_close' => '</table>'
];

$table->setTemplate($template);
Expand Down
52 changes: 26 additions & 26 deletions user_guide_src/source/testing/controllers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ to run as the parameter::
public function testShowCategories()
{
$result = $this->withURI('http://example.com/categories')
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

$this->assertTrue($result->isOK());
}
Expand All @@ -63,7 +63,7 @@ Specifies the class name of the controller to test. The first parameter must be
Executes the specified method within the controller. The only parameter is the name of the method to run::

$results = $this->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->execute('showCategories');

This returns a new helper class that provides a number of routines for checking the response itself. See below
for details.
Expand All @@ -76,8 +76,8 @@ Allows you to pass in a modified version of **Config\App.php** to test with diff
$config->appTimezone = 'America/Chicago';

$results = $this->withConfig($config)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

If you do not provide one, the application's App config file will be used.

Expand All @@ -89,8 +89,8 @@ Allows you to provide an **IncomingRequest** instance tailored to your testing n
$request->setLocale($locale);

$results = $this->withRequest($request)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

If you do not provide one, a new IncomingRequest instance with the default application values will be passed
into your controller.
Expand All @@ -102,8 +102,8 @@ Allows you to provide a **Response** instance::
$response = new CodeIgniter\HTTP\Response(new Config\App());

$results = $this->withResponse($response)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

If you do not provide one, a new Response instance with the default application values will be passed
into your controller.
Expand All @@ -115,9 +115,9 @@ Allows you to provide a **Logger** instance::
$logger = new CodeIgniter\Log\Handlers\FileHandler();

$results = $this->withResponse($response)
-> withLogger($logger)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->withLogger($logger)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

If you do not provide one, a new Logger instance with the default configuration values will be passed
into your controller.
Expand All @@ -129,8 +129,8 @@ This is helpful if you need to check URI segments within your controller. The on
representing a valid URI::

$results = $this->withURI('http://example.com/forums/categories')
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

It is a good practice to always provide the URI during testing to avoid surprises.

Expand All @@ -142,8 +142,8 @@ you need to set a JSON value as the body. The only parameter is a string that re
$body = json_encode(['foo' => 'bar']);

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

Checking the Response
=====================
Expand All @@ -157,8 +157,8 @@ This provides a simple check that the response would be considered a "successful
the HTTP status code is within the 200 or 300 ranges::

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

if ($results->isOK())
{
Expand All @@ -170,8 +170,8 @@ the HTTP status code is within the 200 or 300 ranges::
Checks to see if the final response was a redirection of some sort::

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

if ($results->isRedirect())
{
Expand All @@ -183,8 +183,8 @@ Checks to see if the final response was a redirection of some sort::
You can access the Request object that was generated with this method::

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

$request = $results->request();

Expand All @@ -193,8 +193,8 @@ You can access the Request object that was generated with this method::
This allows you access to the response object that was generated, if any::

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

$response = $results->response();

Expand All @@ -204,8 +204,8 @@ You can access the body of the response that would have been sent to the client
be generated HTML, or a JSON response, etc.::

$results = $this->withBody($body)
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');
->controller(\App\Controllers\ForumController::class)
->execute('showCategories');

$body = $results->getBody();

Expand Down

0 comments on commit ecc4250

Please sign in to comment.