Created
April 3, 2019 21:21
-
-
Save Firehed/c4492b4c1cbdb904c6bcd424a1628e30 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
{ | |
"name": "firehed/psalm-repro", | |
"require-dev": { | |
"vimeo/psalm": "dev-master" | |
}, | |
"authors": [ | |
{ | |
"name": "Eric Stern", | |
"email": "[email protected]" | |
} | |
], | |
"autoload": { | |
"psr-4": { | |
"Foo\\": "src" | |
} | |
}, | |
"require": {} | |
} |
This file contains hidden or 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 | |
return [ | |
1, | |
2, | |
3, | |
]; |
This file contains hidden or 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 | |
namespace Foo; | |
class Bar | |
{ | |
public function baz() | |
{ | |
$file = 'list.php'; | |
if (!file_exists($file)) { | |
throw new \RuntimeException(); | |
} | |
$data = include $file; | |
return $data; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note:
src_Bar.php
should besrc/Bar.php
but Gists don't support directories.