Skip to content

Commit ec84a00

Browse files
author
Kirill Nesmeyanov
committed
Fix readme example
1 parent 59fd335 commit ec84a00

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,29 @@ $converter = new \TypeLang\ReflectionConverter\Converter();
7272
// Dump all constants with its types.
7373
foreach ($class->getReflectionConstants() as $constant) {
7474
// Creates type node AST from a constant's type.
75-
if ($type = $converter->convertConstantType($constant)); {
75+
if ($type = $converter->convertConstantType($constant)) {
7676
echo 'const ' . $constant->name . ' has type ' . $printer->print($type) . "\n";
7777
}
7878
}
7979

8080
// Dump all properties with its types.
8181
foreach ($class->getProperties() as $property) {
8282
// Creates type node AST from a property's type.
83-
if ($type = $converter->convertPropertyType($property)); {
83+
if ($type = $converter->convertPropertyType($property)) {
8484
echo 'property ' . $property->name . ' has type ' . $printer->print($type) . "\n";
8585
}
8686
}
8787

8888
// Dump all methods with its types.
8989
foreach ($class->getMethods() as $method) {
9090
// Creates type node AST from any function's return type.
91-
if ($type = $converter->convertFunctionType($method)); {
91+
if ($type = $converter->convertFunctionType($method)) {
9292
echo 'function ' . $method->name . ' has type ' . $printer->print($type) . "\n";
9393
}
9494

9595
// Creates type node AST from a parameter's type.
9696
foreach ($method->getParameters() as $parameter) {
97-
if ($type = $converter->convertParameterType($parameter)); {
97+
if ($type = $converter->convertParameterType($parameter)) {
9898
echo 'parameter ' . $parameter->name . ' has type ' . $printer->print($type) . "\n";
9999
}
100100
}

0 commit comments

Comments
 (0)