Skip to content

Commit 3b153e7

Browse files
authored
Merge pull request #5414 from kenjis/fix-docs-coding-style
docs: fix coding style
2 parents 92c856d + 6ca2cfe commit 3b153e7

9 files changed

Lines changed: 21 additions & 21 deletions

File tree

user_guide_src/source/installation/upgrade_migrations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ Path: **application/migrations**::
6363
{
6464
$this->dbforge->add_field(array(
6565
'blog_id' => array(
66-
'type' => 'INT',
67-
'constraint' => 5,
68-
'unsigned' => true,
66+
'type' => 'INT',
67+
'constraint' => 5,
68+
'unsigned' => true,
6969
'auto_increment' => true,
7070
),
7171
'blog_title' => array(
72-
'type' => 'VARCHAR',
72+
'type' => 'VARCHAR',
7373
'constraint' => '100',
7474
),
7575
'blog_description' => array(

user_guide_src/source/installation/upgrade_models.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ Path: **application/models**::
5050
public function insert($name, $address, $email)
5151
{
5252
$this->db->insert('user_contacts', array(
53-
"name" => $name,
54-
"address" => $address,
55-
"email" => $email,
53+
'name' => $name,
54+
'address' => $address,
55+
'email' => $email,
5656
));
5757
}
5858
}

user_guide_src/source/installation/upgrade_pagination.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ CodeIgniter Version 3.11
3939
::
4040

4141
$this->load->library('pagination');
42-
$config['base_url'] = base_url().'users/index/';
43-
$config['total_rows'] = $this->db->count_all('users');
44-
$config['per_page'] = 10;
42+
$config['base_url'] = base_url().'users/index/';
43+
$config['total_rows'] = $this->db->count_all('users');
44+
$config['per_page'] = 10;
4545
$config['uri_segment'] = 3;
46-
$config['attributes'] = array('class' => 'pagination-link');
46+
$config['attributes'] = array('class' => 'pagination-link');
4747
$this->pagination->initialize($config);
4848

4949
$data['users'] = $this->user_model->get_users(FALSE, $config['per_page'], $offset);

user_guide_src/source/installation/upgrade_view_parser.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CodeIgniter Version 3.11
3333
$this->load->library('parser');
3434

3535
$data = array(
36-
'blog_title' => 'My Blog Title',
36+
'blog_title' => 'My Blog Title',
3737
'blog_heading' => 'My Blog Heading'
3838
);
3939

user_guide_src/source/installation/upgrade_views.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Path: **app/Views**::
7070
<ul>
7171
<?php foreach ($todo_list as $item): ?>
7272
<li><?= esc($item) ?></li>
73-
<?php endforeach; ?>
73+
<?php endforeach ?>
7474
</ul>
7575

7676
</body>

user_guide_src/source/libraries/pagination.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ usefulness. It is easiest to demonstrate creating a new view by showing you the
250250
</li>
251251
<?php endif ?>
252252

253-
<?php foreach ($pager->links() as $link) : ?>
253+
<?php foreach ($pager->links() as $link): ?>
254254
<li <?= $link['active'] ? 'class="active"' : '' ?>>
255255
<a href="<?= $link['uri'] ?>">
256256
<?= $link['title'] ?>
@@ -328,7 +328,7 @@ See following an example with these changes::
328328
</li>
329329
<?php endif ?>
330330

331-
<?php foreach ($pager->links() as $link) : ?>
331+
<?php foreach ($pager->links() as $link): ?>
332332
<li <?= $link['active'] ? 'class="active"' : '' ?>>
333333
<a href="<?= $link['uri'] ?>">
334334
<?= $link['title'] ?>

user_guide_src/source/libraries/validation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ a new view at **/app/Views/_errors_list.php**::
607607

608608
<div class="alert alert-danger" role="alert">
609609
<ul>
610-
<?php foreach ($errors as $error) : ?>
610+
<?php foreach ($errors as $error): ?>
611611
<li><?= esc($error) ?></li>
612612
<?php endforeach ?>
613613
</ul>

user_guide_src/source/outgoing/alternative_php.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ a simplified format as well. Here is an example using ``foreach``::
2929

3030
<ul>
3131

32-
<?php foreach ($todo as $item) : ?>
32+
<?php foreach ($todo as $item): ?>
3333

3434
<li><?= $item ?></li>
3535

@@ -46,15 +46,15 @@ Also notice that instead of using a semicolon after each structure
4646

4747
Here is another example, using ``if``/``elseif``/``else``. Notice the colons::
4848

49-
<?php if ($username === 'sally') : ?>
49+
<?php if ($username === 'sally'): ?>
5050

5151
<h3>Hi Sally</h3>
5252

53-
<?php elseif ($username === 'joe') : ?>
53+
<?php elseif ($username === 'joe'): ?>
5454

5555
<h3>Hi Joe</h3>
5656

57-
<?php else : ?>
57+
<?php else: ?>
5858

5959
<h3>Hi unknown user</h3>
6060

user_guide_src/source/tutorial/news_section.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ and add the next piece of code.
217217
</div>
218218
<p><a href="/news/<?= esc($news_item['slug'], 'url') ?>">View article</a></p>
219219

220-
<?php endforeach; ?>
220+
<?php endforeach ?>
221221

222222
<?php else: ?>
223223

0 commit comments

Comments
 (0)