Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UG] a comma after use: i.e., and e.g., #4042

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions user_guide_src/source/cli/cli_generators.rst
Expand Up @@ -203,7 +203,7 @@ Options:

.. note:: Working on modules? Code generation will set the root namespace to a default of ``APP_NAMESPACE``.
Should you need to have the generated code elsewhere in your module namespace, make sure to set
the ``-n`` option in your command, e.g. ``php spark make:model blog -n Acme\Blog``.
the ``-n`` option in your command, e.g., ``php spark make:model blog -n Acme\Blog``.

.. warning:: Make sure when setting the ``-n`` option that the supplied namespace is a valid namespace
defined in your ``$psr4`` array in ``Config\Autoload`` or defined in your composer autoload file.
Expand Down Expand Up @@ -344,12 +344,12 @@ which is public and need not be overridden as it is essentially complete.
``getNamespacedClass`` and ``getTemplate``, or else you will get a PHP fatal error.

.. note:: ``GeneratorCommand`` has the default argument of ``['name' => 'Class name']``. You can
override the description by supplying the name in your ``$arguments`` property, e.g. ``['name' => 'Module class name']``.
override the description by supplying the name in your ``$arguments`` property, e.g., ``['name' => 'Module class name']``.

.. note:: ``GeneratorCommand`` has the default options of ``-n`` and ``--force``. Child classes cannot override
these two properties as they are crucial in the implementation of the code generation.

.. note:: Generators are default listed under the ``Generators`` namespace because it is the default group
name in ``GeneratorCommand``. If you want to have your own generator listed elsewhere under a different
namespace, you will just need to provide the ``$group`` property in your child generator,
e.g. ``protected $group = 'CodeIgniter';``.
e.g., ``protected $group = 'CodeIgniter';``.
2 changes: 1 addition & 1 deletion user_guide_src/source/concepts/factories.rst
Expand Up @@ -16,7 +16,7 @@ anywhere. This is a great way to reuse object states and reduce memory load from
multiple instances loaded across your app.

Anything can be loaded by Factories, but the best examples are those classes that are used
to work on or transmit common data. The framework itself uses Factories internally, e.g. to
to work on or transmit common data. The framework itself uses Factories internally, e.g., to
make sure the correct configuration is loaded when using the ``Config`` class.

Take a look at ``Models`` as an example. You can access the Factory specific to ``Models``
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/concepts/http.rst
Expand Up @@ -74,7 +74,7 @@ is an object-oriented representation of the HTTP request. It provides everything

$request = service('request');

// the URI being requested (i.e. /about)
// the URI being requested (i.e., /about)
$request->uri->getPath();

// Retrieve $_GET and $_POST variables
Expand All @@ -100,7 +100,7 @@ is an object-oriented representation of the HTTP request. It provides everything
The request class does a lot of work in the background for you, that you never need to worry about.
The `isAJAX()` and `isSecure()` methods check several different methods to determine the correct answer.

.. note:: The ``isAJAX()`` method depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e. fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.
.. note:: The ``isAJAX()`` method depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e., fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.

CodeIgniter also provides a :doc:`Response class </outgoing/response>` that is an object-oriented representation
of the HTTP response. This gives you an easy and powerful way to construct your response to the client::
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/database/configuration.rst
Expand Up @@ -65,7 +65,7 @@ add the config variables as a query string::
// Postgre
$default['DSN'] = 'Postgre://username:password@hostname:5432/database?charset=utf8&connect_timeout=5&sslmode=1';

.. note:: If you provide a DSN string and it is missing some valid settings (e.g. the
.. note:: If you provide a DSN string and it is missing some valid settings (e.g., the
database character set), which are present in the rest of the configuration
fields, CodeIgniter will append them.

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/database/query_builder.rst
Expand Up @@ -412,7 +412,7 @@ searches.

.. note:: All ``like*`` method variations can be forced to perform case-insensitive searches by passing
a fifth parameter of ``true`` to the method. This will use platform-specific features where available
otherwise, will force the values to be lowercase, i.e. ``WHERE LOWER(column) LIKE '%search%'``. This
otherwise, will force the values to be lowercase, i.e., ``WHERE LOWER(column) LIKE '%search%'``. This
may require indexes to be made for ``LOWER(column)`` instead of ``column`` to be effective.

#. **Simple key/value method:**
Expand Down Expand Up @@ -609,7 +609,7 @@ searches.

.. note:: All ``havingLike*`` method variations can be forced to perform case-insensitive searches by passing
a fifth parameter of ``true`` to the method. This will use platform-specific features where available
otherwise, will force the values to be lowercase, i.e. ``HAVING LOWER(column) LIKE '%search%'``. This
otherwise, will force the values to be lowercase, i.e., ``HAVING LOWER(column) LIKE '%search%'``. This
may require indexes to be made for ``LOWER(column)`` instead of ``column`` to be effective.

#. **Simple key/value method:**
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/dbmgmt/migration.rst
Expand Up @@ -27,7 +27,7 @@ Migration file names

Each Migration is run in numeric order forward or backwards depending on the
method taken. Each migration is numbered using the timestamp when the migration
was created, in **YYYYMMDDHHIISS** format (e.g. **20121031100537**). This
was created, in **YYYYMMDDHHIISS** format (e.g., **20121031100537**). This
helps prevent numbering conflicts when working in a team environment.

Prefix your migration files with the migration number followed by an underscore
Expand Down Expand Up @@ -306,7 +306,7 @@ Class Reference

.. php:method:: regress($batch, $group)

:param mixed $batch: previous batch to migrate down to; 1+ specifies the batch, 0 reverts all, negative refers to the relative batch (e.g. -3 means "three batches back")
:param mixed $batch: previous batch to migrate down to; 1+ specifies the batch, 0 reverts all, negative refers to the relative batch (e.g., -3 means "three batches back")
:param mixed $group: database group name, if null default database group will be used.
:returns: ``true`` on success, ``false`` on failure or no migrations are found
:rtype: bool
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/extending/contributing.rst
Expand Up @@ -51,11 +51,11 @@ If you've found a critical vulnerability, we'd be happy to credit you in our
Tips for a Good Issue Report
****************************

Use a descriptive subject line (eg parser library chokes on commas) rather than a vague one (eg. your code broke).
Use a descriptive subject line (eg parser library chokes on commas) rather than a vague one (e.g., your code broke).

Address a single issue in a report.

Identify the CodeIgniter version (eg 4.0.1) and the component if you know it (eg. parser library)
Identify the CodeIgniter version (eg 4.0.1) and the component if you know it (e.g., parser library)

Explain what you expected to happen, and what did happen.
Include error messages and stack trace, if any.
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/general/ajax.rst
Expand Up @@ -2,7 +2,7 @@
AJAX Requests
##############

The ``IncomingRequest::isAJAX()`` method uses the ``X-Requested-With`` header to define whether the request is XHR or normal. However, the most recent JavaScript implementations (i.e. fetch) no longer send this header along with the request, thus the use of ``IncomingRequest::isAJAX()`` becomes less reliable, because without this header it is not possible to define whether the request is or not XHR.
The ``IncomingRequest::isAJAX()`` method uses the ``X-Requested-With`` header to define whether the request is XHR or normal. However, the most recent JavaScript implementations (i.e., fetch) no longer send this header along with the request, thus the use of ``IncomingRequest::isAJAX()`` becomes less reliable, because without this header it is not possible to define whether the request is or not XHR.

To get around this problem, the most efficient solution (so far) is to manually define the request header, forcing the information to be sent to the server, which will then be able to identify that the request is XHR.

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/general/logging.rst
Expand Up @@ -130,7 +130,7 @@ Several core placeholders exist that will be automatically expanded for you base
+----------------+---------------------------------------------------+
| {session_vars} | $_SESSION variables |
+----------------+---------------------------------------------------+
| {env} | Current environment name, i.e. development |
| {env} | Current environment name, i.e., development |
+----------------+---------------------------------------------------+
| {file} | The name of file calling the logger |
+----------------+---------------------------------------------------+
Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/helpers/form_helper.rst
Expand Up @@ -208,7 +208,7 @@ The following functions are available:
:param array $data: Field attributes data
:param string $value: Field value
:param mixed $extra: Extra attributes to be added to the tag either as an array or a literal string
:param string $type: The type of input field. i.e. 'text', 'email', 'number', etc.
:param string $type: The type of input field. i.e., 'text', 'email', 'number', etc.
:returns: An HTML text input field tag
:rtype: string

Expand Down Expand Up @@ -382,7 +382,7 @@ The following functions are available:

The parameter usage is identical to using :php:func:`form_dropdown()` above,
except of course that the name of the field will need to use POST array
syntax, e.g. foo[].
syntax, e.g., foo[].

.. php:function:: form_fieldset([$legend_text = ''[, $attributes = []]])

Expand Down Expand Up @@ -615,7 +615,7 @@ The following functions are available:
second (optional) parameter allows you to set a default value for the
form. The third (optional) parameter allows you to turn off HTML escaping
of the value, in case you need to use this function in combination with
i.e. :php:func:`form_input()` and avoid double-escaping.
i.e., :php:func:`form_input()` and avoid double-escaping.

Example::

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/helpers/html_helper.rst
Expand Up @@ -85,7 +85,7 @@ The following functions are available:

Note that $path must exist and be a readable image format supported by the ``data:`` protocol.
This function is not recommended for very large files, but it provides a convenient way
of serving images from your app that are not web-accessible (e.g. in **public/**).
of serving images from your app that are not web-accessible (e.g., in **public/**).

.. php:function:: link_tag([$href = ''[, $rel = 'stylesheet'[, $type = 'text/css'[, $title = ''[, $media = ''[, $indexPage = false[, $hreflang = '']]]]]]])

Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/helpers/number_helper.rst
Expand Up @@ -93,7 +93,7 @@ The following functions are available:
.. php:function:: number_to_currency($num, $currency[, $locale = null])

:param mixed $num: Number to format
:param string $currency: The currency type, i.e. USD, EUR, etc
:param string $currency: The currency type, i.e., USD, EUR, etc
:param string $locale: The locale to use for formatting
:param integer $fraction: Number of fraction digits after decimal point
:returns: The number as the appropriate currency for the locale
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/helpers/text_helper.rst
Expand Up @@ -101,7 +101,7 @@ The following functions are available:
:rtype: string

Converts double slashes in a string to a single slash, except those
found in URL protocol prefixes (e.g. http&#58;//).
found in URL protocol prefixes (e.g., http&#58;//).

Example::

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/helpers/url_helper.rst
Expand Up @@ -24,7 +24,7 @@ The following functions are available:
.. php:function:: site_url([$uri = ''[, $protocol = NULL[, $altConfig = NULL]]])

:param mixed $uri: URI string or array of URI segments
:param string $protocol: Protocol, e.g. 'http' or 'https'
:param string $protocol: Protocol, e.g., 'http' or 'https'
:param \\Config\\App $altConfig: Alternate configuration to use
:returns: Site URL
:rtype: string
Expand Down Expand Up @@ -58,7 +58,7 @@ The following functions are available:
.. php:function:: base_url([$uri = ''[, $protocol = NULL]])

:param mixed $uri: URI string or array of URI segments
:param string $protocol: Protocol, e.g. 'http' or 'https'
:param string $protocol: Protocol, e.g., 'http' or 'https'
:returns: Base URL
:rtype: string

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/helpers/xml_helper.rst
Expand Up @@ -29,7 +29,7 @@ The following functions are available:
.. php:function:: xml_convert($str[, $protect_all = FALSE])

:param string $str: the text string to convert
:param bool $protect_all: Whether to protect all content that looks like a potential entity instead of just numbered entities, e.g. &foo;
:param bool $protect_all: Whether to protect all content that looks like a potential entity instead of just numbered entities, e.g., &foo;
:returns: XML-converted string
:rtype: string

Expand All @@ -42,7 +42,7 @@ The following functions are available:
- Dashes: -

This function ignores ampersands if they are part of existing numbered
character entities, e.g. &#123;. Example::
character entities, e.g., &#123;. Example::

$string = '<p>Here is a paragraph & an entity (&#123;).</p>';
$string = xml_convert($string);
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/incoming/filters.rst
Expand Up @@ -171,7 +171,7 @@ In addition to the standard HTTP methods, this also supports two special cases:
self-explanatory here, but 'cli' would apply to all requests that were run from the command line, while 'ajax'
would apply to every AJAX request.

.. note:: The AJAX requests depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e. fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.
.. note:: The AJAX requests depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e., fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.

$filters
========
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/incoming/incomingrequest.rst
Expand Up @@ -74,14 +74,14 @@ be checked with the ``isAJAX()`` and ``isCLI()`` methods::
// ...
}

.. note:: The ``isAJAX()`` method depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e. fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.
.. note:: The ``isAJAX()`` method depends on the ``X-Requested-With`` header, which in some cases is not sent by default in XHR requests via JavaScript (i.e., fetch). See the :doc:`AJAX Requests </general/ajax>` section on how to avoid this problem.

You can check the HTTP method that this request represents with the ``method()`` method::

// Returns 'post'
$method = $request->getMethod();

By default, the method is returned as a lower-case string (i.e. 'get', 'post', etc). You can get an
By default, the method is returned as a lower-case string (i.e., 'get', 'post', etc). You can get an
uppercase version by wrapping the call in ``str_to_upper()``::

// Returns 'GET'
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/incoming/routing.rst
Expand Up @@ -462,7 +462,7 @@ then you can change this value to save typing::
Default Controller
------------------

When a user visits the root of your site (i.e. example.com) the controller to use is determined by the value set by
When a user visits the root of your site (i.e., example.com) the controller to use is determined by the value set by
the ``setDefaultController()`` method, unless a route exists for it explicitly. The default value for this is ``Home``
which matches the controller at ``/app/Controllers/Home.php``::

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/installation/installing_composer.rst
Expand Up @@ -66,7 +66,7 @@ If `--prefer-source` doesn't automatically update to pull latest framework sourc
rm -rf vendor/codeigniter4/framework && composer update codeigniter4/framework --prefer-source

If you used the "--no-dev" option when you created the project, it
would be appropriate to do so here too, i.e. ``composer update --no-dev``.
would be appropriate to do so here too, i.e., ``composer update --no-dev``.

Read the upgrade instructions, and check designated ``app/Config`` folders for affected changes.

Expand Down Expand Up @@ -139,7 +139,7 @@ to your project root
Copy the ``env``, ``phpunit.xml.dist`` and ``spark`` files, from
``vendor/codeigniter4/framework`` to your project root

You will have to adjust the system path to refer to the vendor one, e.g. ``ROOTPATH . '/vendor/codeigniter4/framework/system'``,
You will have to adjust the system path to refer to the vendor one, e.g., ``ROOTPATH . '/vendor/codeigniter4/framework/system'``,
- the ``$systemDirectory`` variable in ``app/Config/Paths.php``

Upgrading
Expand Down
8 changes: 4 additions & 4 deletions user_guide_src/source/installation/running.rst
Expand Up @@ -31,7 +31,7 @@ By default, the application will run using the "production" environment. To
take advantage of the debugging tools provided, you should set the environment
to "development".

.. note:: If you will be running your site using a web server (e.g. Apache or Nginx),
.. note:: If you will be running your site using a web server (e.g., Apache or Nginx),
you will need to modify the permissions for the ``writable`` folder inside
your project, so that it is writable by the user or account used by your
web server.
Expand Down Expand Up @@ -86,7 +86,7 @@ The “mod_rewrite” module enables URLs without “index.php” in them, and i
in our user guide.

Make sure that the rewrite module is enabled (uncommented) in the main
configuration file, eg. ``apache2/conf/httpd.conf``::
configuration file, e.g., ``apache2/conf/httpd.conf``::

LoadModule rewrite_module modules/mod_rewrite.so

Expand All @@ -106,7 +106,7 @@ We recommend using “virtual hosting” to run your apps.
You can set up different aliases for each of the apps you work on,

Make sure that the virtual hosting module is enabled (uncommented) in the main
configuration file, eg. ``apache2/conf/httpd.conf``::
configuration file, e.g., ``apache2/conf/httpd.conf``::

LoadModule vhost_alias_module modules/mod_vhost_alias.so

Expand All @@ -117,7 +117,7 @@ Add a line to the file. This could be "myproject.local" or "myproject.test", for
127.0.0.1 myproject.local

Add a <VirtualHost> element for your webapp inside the virtual hosting configuration,
eg. ``apache2/conf/extra/httpd-vhost.conf``::
e.g., ``apache2/conf/extra/httpd-vhost.conf``::

<VirtualHost *:80>
DocumentRoot "/opt/lamp7.2/apache2/htdocs/myproject/public"
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/installation/upgrade_4xx.rst
Expand Up @@ -53,7 +53,7 @@ subforum for an up-to-date list!
- Classes are instantiated where needed, and components are managed
by ``Services``
- The class loader automatically handles PSR4 style class locating,
within the ``App`` (application) and ``CodeIgniter`` (i.e. system) top level
within the ``App`` (application) and ``CodeIgniter`` (i.e., system) top level
namespaces; with composer autoloading support, and even using educated
guessing to find your models and libraries if they are in the right
folder even though not namespaced
Expand All @@ -68,7 +68,7 @@ subforum for an up-to-date list!
- CI provides ``Request`` and ``Response`` objects for you to work with -
more powerful than the CI3-way
- If you want a base controller (MY_Controller in CI3), make it
where you like, e.g. BaseController extends Controller, and then
where you like, e.g., BaseController extends Controller, and then
have your controllers extend it

**Models**
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/libraries/encryption.rst
Expand Up @@ -72,7 +72,7 @@ The example above uses the configuration settings found in ``app/Config/Encrypti
Option Possible values (default in parentheses)
========== ====================================================
key Encryption key starter
driver Preferred handler, e.g. OpenSSL or Sodium (``OpenSSL``)
driver Preferred handler, e.g., OpenSSL or Sodium (``OpenSSL``)
blockSize Padding length in bytes for SodiumHandler (``16``)
digest Message digest algorithm (``SHA512``)
========== ====================================================
Expand Down Expand Up @@ -124,7 +124,7 @@ Encoding Keys or Results
------------------------

You'll notice that the ``createKey()`` method outputs binary data, which
is hard to deal with (i.e. a copy-paste may damage it), so you may use
is hard to deal with (i.e., a copy-paste may damage it), so you may use
``bin2hex()``, or ``base64_encode`` to work with the key in
a more friendly manner. For example::

Expand Down