Skip to content

Commit e0bb7a7

Browse files
committed
docs: fix models indentation
1 parent 83e44c6 commit e0bb7a7

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

user_guide_src/source/models/entities.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ the value whenever the property is set::
373373
{
374374
protected $casts = [
375375
'options' => 'array',
376-
'options_object' => 'json',
377-
'options_array' => 'json-array',
376+
'options_object' => 'json',
377+
'options_array' => 'json-array',
378378
];
379379
}
380380

user_guide_src/source/models/model.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -674,12 +674,12 @@ Working With Query Builder
674674
You can get access to a shared instance of the Query Builder for that model's database connection any time you
675675
need it::
676676

677-
$builder = $userModel->builder();
677+
$builder = $userModel->builder();
678678

679679
This builder is already set up with the model's $table. If you need access to another table
680680
you can pass it in as a parameter, but be aware that this will not return a shared instance::
681681

682-
$groupBuilder = $userModel->builder('groups');
682+
$groupBuilder = $userModel->builder('groups');
683683

684684
You can also use Query Builder methods and the Model's CRUD methods in the same chained call, allowing for
685685
very elegant use::
@@ -777,12 +777,12 @@ use the same callback in multiple events::
777777

778778
Additionally, each model may allow (default) or deny callbacks class-wide by setting its $allowCallbacks property::
779779

780-
protected $allowCallbacks = false;
780+
protected $allowCallbacks = false;
781781

782782
You may also change this setting temporarily for a single model call sing the ``allowCallbacks()`` method::
783783

784-
$model->allowCallbacks(false)->find(1); // No callbacks triggered
785-
$model->find(1); // Callbacks subject to original property value
784+
$model->allowCallbacks(false)->find(1); // No callbacks triggered
785+
$model->find(1); // Callbacks subject to original property value
786786

787787
Event Parameters
788788
----------------
@@ -829,16 +829,16 @@ boolean, ``returnData``::
829829

830830
protected $beforeFind = ['checkCache'];
831831
...
832-
protected function checkCache(array $data)
833-
{
834-
// Check if the requested item is already in our cache
835-
if (isset($data['id']) && $item = $this->getCachedItem($data['id']]))
836-
{
837-
$data['data'] = $item;
838-
$data['returnData'] = true;
839-
840-
return $data;
841-
...
832+
protected function checkCache(array $data)
833+
{
834+
// Check if the requested item is already in our cache
835+
if (isset($data['id']) && $item = $this->getCachedItem($data['id']]))
836+
{
837+
$data['data'] = $item;
838+
$data['returnData'] = true;
839+
840+
return $data;
841+
...
842842

843843
Manual Model Creation
844844
=====================

0 commit comments

Comments
 (0)