PHPackages                             sn1054/psalm-for-moodle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sn1054/psalm-for-moodle

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

sn1054/psalm-for-moodle
=======================

A fork of vimeo/psalm for Moodle

010.7k↓26%PHP

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/SN1054/psalm-for-moodle)[ Packagist](https://packagist.org/packages/sn1054/psalm-for-moodle)[ RSS](/packages/sn1054-psalm-for-moodle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

About Psalm
===========

[](#about-psalm)

Psalm is a static analysis tool that attempts to dig into your program and find as many type-related bugs as possible.

It has a few features that go further than other similar tools:

- **Mixed type warnings**
    If Psalm cannot infer a type for an expression then it uses a `mixed` placeholder type. `mixed` types can sometimes mask bugs, so keeping track of them helps you avoid a number of common pitfalls.
- **Intelligent logic checks**
    Psalm keeps track of logical assertions made about your code, so `if ($a && $a) {}` and `if ($a && !$a) {}` are both treated as issues. Psalm also keeps track of logical assertions made in prior code paths, preventing issues like `if ($a) {} elseif ($a) {}`.
- **Property initialisation checks**
    Psalm checks that all properties of a given object have values after the constructor is called.
- **Taint analysis**
    Psalm can [detect security vulnerabilities](https://psalm.dev/articles/detect-security-vulnerabilities-with-psalm) in your code.
- **Language Server**
    Psalm has a Language Server that’s [compatible with a range of different IDEs](https://psalm.dev/docs/running_psalm/language_server/).
- **Automatic fixes**
    Psalm can [fix many of the issues it finds automatically](https://psalm.dev/docs/manipulating_code/fixing/).
- **Automatic refactoring**
    Psalm can also [perform simple refactors](https://psalm.dev/docs/manipulating_code/refactoring/) from the command line.

Example output
--------------

[](#example-output)

Given a file `implode_strings.php`:

```
