diff --git a/.gitignore b/.gitignore index ca6c07b..d769eb5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -.phan vendor .phpunit.result.cache composer.lock -phpunit.xml -phpstan.neon -psalm.xml diff --git a/.phan/config.php b/.phan/config.php new file mode 100644 index 0000000..87138de --- /dev/null +++ b/.phan/config.php @@ -0,0 +1,97 @@ + false, + + // Allow null to be cast as any type and for any + // type to be cast to null. + "null_casts_as_any_type" => false, + + // Backwards Compatibility Checking + 'backward_compatibility_checks' => true, + + // Run a quick version of checks that takes less + // time + "quick_mode" => false, + + // Only emit critical issues to start with + // (0 is low severity, 5 is normal severity, 10 is critical) + "minimum_severity" => 10, + + // default false for include path check + "enable_include_path_checks" => true, + "include_paths" => [ + ], + 'ignore_undeclared_variables_in_global_scope' => true, + + "file_list" => [ + ], + + // A list of directories that should be parsed for class and + // method information. After excluding the directories + // defined in exclude_analysis_directory_list, the remaining + // files will be statically analyzed for errors. + // + // Thus, both first-party and third-party code being used by + // your application should be included in this list. + 'directory_list' => [ + // Change this to include the folders you wish to analyze + // (and the folders of their dependencies) + '.' + // 'www', + // To speed up analysis, we recommend going back later and + // limiting this to only the vendor/ subdirectories your + // project depends on. + // `phan --init` will generate a list of folders for you + ], + + + // A list of directories holding code that we want + // to parse, but not analyze + "exclude_analysis_directory_list" => [ + 'vendor', + 'test' + ], + 'exclude_file_list' => [ + ], + + // what not to show as problem + 'suppress_issue_types' => [ + // 'PhanUndeclaredMethod', + 'PhanEmptyFile', + ], + + // Override to hardcode existence and types of (non-builtin) globals in the global scope. + // Class names should be prefixed with `\`. + // + // (E.g. `['_FOO' => '\FooClass', 'page' => '\PageClass', 'userId' => 'int']`) + 'globals_type_map' => [], +]; diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..3802893 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,10 @@ +# PHP Stan Config + +parameters: + tmpDir: /tmp/phpstan-codeblocks-dotenv + level: max + paths: + - %currentWorkingDirectory% + excludePaths: + - vendor + - test diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..c333bf5 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,5 @@ + + diff --git a/psalm.xml b/psalm.xml new file mode 100644 index 0000000..5cde799 --- /dev/null +++ b/psalm.xml @@ -0,0 +1,16 @@ + + + + + + + + + +