Skip to content

Commit 3745de5

Browse files
authored
Fixed indents
1 parent b0eaa05 commit 3745de5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/reflection.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ Python has several inspection methods built natively into the language. These i
1717
By use of a [`ReflectionClass`](https://secure.php.net/manual/en/class.reflectionclass.php) object. You may pass an object's name to an object of this type at creation time to allow inspection of various attributes or conditions of a class. For example, the following will provide a list of available methods for a class called `myClass`:
1818
```php
1919
<?php
20-
class myClass {
21-
function foo() {
22-
print "Foo method";
20+
class myClass {
21+
function foo() {
22+
print "Foo method";
2323
}
2424
function bar($baz) {
2525
print "Bar method";
2626
}
2727
}
28-
28+
2929
$reflector = new ReflectionClass('myClass');
3030
var_dump($reflector->getMethods());
3131
?>
@@ -34,11 +34,11 @@ will yield:
3434
```
3535
array(2) {
3636
[0]=> object(ReflectionMethod)#3 (2) {
37-
["name"]=> string(3) "foo"
37+
["name"]=> string(3) "foo"
3838
["class"]=> string(7) "myClass"
3939
}
4040
[1]=> object(ReflectionMethod)#4 (2) {
41-
["name"]=> string(3) "bar"
41+
["name"]=> string(3) "bar"
4242
["class"]=> string(7) "myClass"
4343
}
4444
}
@@ -48,8 +48,8 @@ array(2) {
4848
Various object details can be determined by using the above described and linked reflection method programmatically. For example, to see if an object is an instance of a given class:
4949
```python
5050
class myClass:
51-
def foo(self):
52-
print("foo")
51+
def foo(self):
52+
print("foo")
5353

5454
a = myClass()
5555

0 commit comments

Comments
 (0)