psalm | static analysis tool for finding errors | Code Analyzer library

 by   vimeo PHP Version: 5.12.0 License: MIT

kandi X-RAY | psalm Summary

kandi X-RAY | psalm Summary

psalm is a PHP library typically used in Code Quality, Code Analyzer applications. psalm has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Psalm is a static analysis tool for finding errors in PHP applications.

            kandi-support Support

              psalm has a medium active ecosystem.
              It has 5227 star(s) with 616 fork(s). There are 64 watchers for this library.
              There were 10 major release(s) in the last 12 months.
              There are 1379 open issues and 5519 have been closed. On average issues are closed in 136 days. There are 56 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of psalm is 5.12.0

            kandi-Quality Quality

              psalm has 0 bugs and 0 code smells.

            kandi-Security Security

              psalm has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              psalm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              psalm is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              psalm releases are available to install and integrate.
              Installation instructions are available. Examples and code snippets are not available.
              It has 154174 lines of code, 3205 functions and 1091 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed psalm and discovered the below as its top functions. This is intended to give you an instant insight into psalm implemented functionality, and help decide if they suit your requirements.
            • Verifies the return type of a function .
            • Loads a function - like AST node .
            • Analyze the operands .
            • Analyzes an atomic assignment .
            • Handle a named call .
            • Scrape type properties .
            • Analyze a assignment .
            • Verify type of given type .
            • Checks if arguments match .
            • Expands an atomic type .
            Get all kandi verified functions for this library.

            psalm Key Features

            No Key Features are available at this moment for psalm.

            psalm Examples and Code Snippets

            No Code Snippets are available at this moment for psalm.

            Community Discussions


            sh: symfony-cmd: command not found
            Asked 2022-Mar-24 at 09:09

            I have downgraded a Symfony 5.2 app template to use Symfony 4.4 in order to allow the use of some libraries that require an older version of Symfony. The problem is that when I do composer install, I get this error near the end of the installation:

            sh: symfony-cmd: command not found

            It seems that the installations are mostly successful, as my vendor folder is created and populated. But I'm worried about the error.

            What does this error mean? How do I fix it?


            Edit: Here's my composer.json file:



            Answered 2021-Aug-29 at 15:16

            symfony-cmd is a part of Symfony Flex. Your composer.json does not contain any requirement for Flex, so running composer require symfony/flex might resolve that problem.



            How to tell psalm to save getter state if property wasn't modified before the further checks?
            Asked 2022-Jan-28 at 22:52
            class A
                private ?string $x = null;
                public function getX(): ?null
                    return $this->x;
            class B
                public function __construct(string $y)
                    // Property initialization...
            $a = new A();
            if ($a->getX() !== null) {
                $b = new B($a->getX());


            Answered 2022-Jan-28 at 22:52

            Psalm need to know that the function has a consistent return value.

            This is something you can describe with @psalm-mutation-free:



            SwiftUI 5.5 Init array with substring of string?
            Asked 2021-Nov-27 at 14:52

            I've written sample data for my view and it looks/works but now i want to replace my sample data with actual data. I've successfully passed in two strings. I'm trying to substring it and replace the wDD and wRead elements of the NamedWeek array with the actual data. Can someone help me how to do that?

            my incoming strings look like: for the wDD -



            Answered 2021-Nov-27 at 14:41

            You can split by the | character, zip the arrays together, then append it to namedWeeks.




            Best way to code custom loop to avoid str.format() key error in this example?
            Asked 2021-Oct-28 at 17:56

            I want to output something that looks like this (with 20 items per line, and two variables are needed, one for indexing, i, and one for the book name, bookname, in this case "Psalm"):



            Answered 2021-Oct-21 at 18:17


            Doctrine - Argument passed to __construct must be an array
            Asked 2021-Oct-19 at 14:59

            I just triying to create a new service when I find this error. When I try to list the doctrine commands avaiable it show me the next error:

            Doctrine\ORM\Mapping\OneToMany::__construct() must be of the type array or null, string given, called in /var/www/html/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php

            I try to reset the entity responsable of it without results. Here is the all trace:



            Answered 2021-Oct-19 at 14:59

            SOLVED - Searching, with time, and patient, I found an error on ORM notation. The composer json file was updated by a teammate, and with the new versión the cascade must to be with brackets, In one place it was the open but not closed.



            How to make Psalm recognize variables from an included file
            Asked 2021-Oct-04 at 13:33

            I have a config file that's included in a function, like this:



            Answered 2021-Oct-04 at 13:33

            Solved by adding a /** @var ... annotation above the include line:



            Get value from the multiple dropdown menu and concatenate them as one in flutter
            Asked 2021-Sep-29 at 07:27

            in the following code i want to extract the value of book,chapter and ver and concatenate from the each drop down menu.So, please do help me on where should I implement the concatenation of three string and get them as one value. For an example : if book= john, chapter=3, and ver=16, I should be able to get "john 3:16".



            Answered 2021-Sep-29 at 07:23

            Just book+" "+chapter+":"+verse should do it. It's elementary string concatenation.



            Psalm multiline associative array annotation
            Asked 2021-Sep-20 at 21:42

            I'm using Psalm style annotations to document for instance return array types, such:



            Answered 2021-Sep-20 at 10:34

            Unfortunately, no, there isn't. Here's a request for this on the PhpStorm tracker:



            How to annotate Laravel Collection elements during iteration
            Asked 2021-Aug-12 at 13:35

            I was thinking about how to annotate types in PhpStorm. I believe PhpStorm is using Psalm to resolve types, but I can't find how to annotate type to get suggestions here:

            $row in my app will always be Collection object and I want to have it marked somewhere here with annotations.

            Does anyone have an idea how to accomplish that?



            Answered 2021-Aug-12 at 13:35

            you can mark var type like this:



            Regex for bible references
            Asked 2021-Mar-26 at 14:50

            I am working on some code for an online bible. I need to identify when references are written out. I have looked all through stackoverflow and tried various regex examples but they all seem to fail with single books (eg Jude) as they require a number to proceed the book name. Here is my solution so far :



            Answered 2021-Mar-26 at 14:50

            It does not match as it expects 2 characters using (([ .)\n|])([^a-zA-Z])) where the second one can not be a char a-zA-Z due to the negated character class, so it can not match the s in Jude some.

            What you might do is make the character class in the second part optional, if you intent to keep all the capture groups.

            You could also add word boundaries \b to make the pattern a bit more performant as it is right now.

            See a regex demo

            (Note that Jude is listed twice in the alternation)

            If you only want to use 3 groups, you can write the first part as:


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install psalm

            To get started, check out the installation guide.


            Documentation is available on Psalm’s website, generated from the docs folder.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • HTTPS


          • CLI

            gh repo clone vimeo/psalm

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Code Analyzer Libraries


            by airbnb


            by standard


            by eslint


            by rome


            by python

            Try Top Libraries by vimeo


            by vimeoJavaScript


            by vimeoPython


            by vimeoPHP


            by vimeoPHP


            by vimeoJava