Created
July 11, 2015 00:06
-
-
Save ircmaxell/3cd3e80c6f17711dab40 to your computer and use it in GitHub Desktop.
Tuli output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = 1.0; | |
$b = 2; | |
$c = foo($a, $b); | |
$d = foo($b, $c); | |
function foo(int $a, int $b): int { | |
if ($a > $b) { | |
return $a + $b + 0.5; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bin/tuli analyze code.php | |
Analyzing code.php | |
Determining Variable Types | |
Round 1 (15 unresolved variables out of 20) | |
. | |
Detecting Type Conversion Issues | |
Type mismatch on foo() argument 0, found float expecting int code.php:6 | |
Type mismatch on foo() return value, found float expecting int code.php:12 | |
Default return found for non-null type int code.php:10 | |
Done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment