Skip to content

Instantly share code, notes, and snippets.

@Firehed
Created April 3, 2019 21:21
Show Gist options
  • Save Firehed/c4492b4c1cbdb904c6bcd424a1628e30 to your computer and use it in GitHub Desktop.
Save Firehed/c4492b4c1cbdb904c6bcd424a1628e30 to your computer and use it in GitHub Desktop.
{
"name": "firehed/psalm-repro",
"require-dev": {
"vimeo/psalm": "dev-master"
},
"authors": [
{
"name": "Eric Stern",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Foo\\": "src"
}
},
"require": {}
}
<?php
return [
1,
2,
3,
];
<?php
namespace Foo;
class Bar
{
public function baz()
{
$file = 'list.php';
if (!file_exists($file)) {
throw new \RuntimeException();
}
$data = include $file;
return $data;
}
}
@Firehed
Copy link
Author

Firehed commented Apr 3, 2019

Note: src_Bar.php should be src/Bar.php but Gists don't support directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment