Skip to content

Commit 4bbc13c

Browse files
committed
docs: fix namespaces for sample classes
1 parent 3d78f16 commit 4bbc13c

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

3+
namespace App\Libraries;
4+
35
class Myclass
46
{
57
public $title = 'My Title';
68
public $content = 'My Content';
79
public $date = 'My Date';
810
}
911

10-
$object = new \Myclass();
12+
$object = new Myclass();
1113
$builder->insert($object);
1214
// Produces: INSERT INTO mytable (title, content, date) VALUES ('My Title', 'My Content', 'My Date')

user_guide_src/source/extending/events/002.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Events::on('pre_system', 'some_function');
77

88
// Call on an instance method
9-
$user = new \User();
9+
$user = new \App\Libraries\User();
1010
Events::on('pre_system', [$user, 'someMethod']);
1111

1212
// Call on a static method

user_guide_src/source/testing/overview/006.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
namespace App\Traits;
4+
35
trait AuthTrait
46
{
57
protected function setUpAuthTrait()
@@ -15,7 +17,7 @@ protected function setUpAuthTrait()
1517

1618
final class AuthenticationFeatureTest extends CIUnitTestCase
1719
{
18-
use \AuthTrait;
20+
use AuthTrait;
1921

2022
// ...
2123
}

0 commit comments

Comments
 (0)