PHPackages                             shopsys/phpstorm-inspect - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. shopsys/phpstorm-inspect

ActiveLibrary[Testing &amp; Quality](/categories/testing)

shopsys/phpstorm-inspect
========================

Package for running PhpStorm's inspections from CLI and displaying results

v1.1.1(8y ago)4110.1k↓24.8%7[1 issues](https://github.com/shopsys/phpstorm-inspect/issues)[1 PRs](https://github.com/shopsys/phpstorm-inspect/pulls)MITPHPPHP &gt;=5.4

Since Mar 16Pushed 8y ago18 watchersCompare

[ Source](https://github.com/shopsys/phpstorm-inspect)[ Packagist](https://packagist.org/packages/shopsys/phpstorm-inspect)[ RSS](/packages/shopsys-phpstorm-inspect/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (11)Used By (0)

phpstorm-inspect
================

[](#phpstorm-inspect)

This package enables you to comfortably use PhpStorm as a CLI tool for static analysis.

Basically, it is a wrapper for PhpStorm's `inspect.sh` script that does some extra work:

- waits for PhpStorm to finish already running inspections (because PhpStorm cannot run more instances of `inspect.sh` in simultaneously; see [IDEA-150272](https://youtrack.jetbrains.com/issue/IDEA-150272))
- clears PhpStorm's cache before every run in order to prevent stale cache issues (otherwise PhpStorm sometimes fails to see new files when switching GIT branches)
- parses XML output generated by PhpStorm and presents it in a readable form (similar to tools like PHP CodeSniffer, PHPMD or PHP CS Fixer)

Usage
-----

[](#usage)

```
php bin/phpstorm-inspect      []
```

### Arguments description

[](#arguments-description)

- `inspectShExecutableFilepath` - path to `inspect.sh` script
- `phpstormSystemPath` - path to `.WebIde*/system` directory
- `projectPath` - path to project directory (that contains `.idea` directory)
- `inspectionProfileFilepath` - path to inspection profile XML file
- `inspectedDirectory` - path in which are the inspected sources
- `format (optional)` - format of output result, accepted values: "text" (default value) / "checkstyle"

Example (text format)
---------------------

[](#example-text-format)

```
php bin/phpstorm-inspect \
  /opt/PhpStorm-139.1348/bin/inspect.sh ~/.WebIde80/system \
  . .idea/inspectionProfiles/Project_Default.xml ./src
```

### Output

[](#output)

```
File: /home/user/project/src/MyBundle/Controller/UserController.php
--------------------------------------------------------------------------------
Found 1 problems
--------------------------------------------------------------------------------
Line 17: Undefined field: Field 'usre' not found in class
--------------------------------------------------------------------------------

File: /home/user/project/src/MyBundle/Controller/ArticleController.php
--------------------------------------------------------------------------------
Found 2 problems
--------------------------------------------------------------------------------
Line 26: Unused local variable: Unused local variable $articleId
Line 32: Unreachable statement: Unreachable statement
--------------------------------------------------------------------------------

```

Example (checkstyle format)
---------------------------

[](#example-checkstyle-format)

```
php bin/phpstorm-inspect \
  /opt/PhpStorm-139.1348/bin/inspect.sh ~/.WebIde80/system \
  . .idea/inspectionProfiles/Project_Default.xml ./src checkstyle > report.xml
```

Content of report.xml
---------------------

[](#content-of-reportxml)

```

```

FAQ / Issues
------------

[](#faq--issues)

### Why should I use this package when I can simply run the inspections from IDE?

[](#why-should-i-use-this-package-when-i-can-simply-run-the-inspections-from-ide)

This package comes handy in environments where you do not have graphical interface.

For example, you can run static code analysis on your Continuous Integration server (eg. Jenkins).

### Does CLI inspections work when PhpStorm IDE is running?

[](#does-cli-inspections-work-when-phpstorm-ide-is-running)

Unfortunately not. PhpStorm currently does not support running `inspect.sh` script when IDE is running. You need to close the IDE when you want to run inspections from CLI.

### What PhpStorm versions are supported?

[](#what-phpstorm-versions-are-supported)

The package was tested with PhpStorm 8.0 (139.732) but the newer versions will probably work too.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~113 days

Recently: every ~226 days

Total

9

Last Release

3217d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5638367?v=4)[Tomáš Ludvik](/maintainers/TomasLudvik)[@TomasLudvik](https://github.com/TomasLudvik)

![](https://avatars.githubusercontent.com/u/1177414?v=4)[Martin Grossmann](/maintainers/grossmannmartin)[@grossmannmartin](https://github.com/grossmannmartin)

![](https://www.gravatar.com/avatar/8aee0045853dd983a2a4f291d2e21e7492e2d8c19d84cdb7a76dd16c3eb499f9?d=identicon)[rostislav.vitek@shopsys.com](/maintainers/rostislav.vitek@shopsys.com)

![](https://www.gravatar.com/avatar/0a44b48b2c3e7114fdf1cbdf9170494591abad48f5fc416d93b134abd771635f?d=identicon)[Miroslav Stopka](/maintainers/Miroslav%20Stopka)

---

Top Contributors

[![sustmi](https://avatars.githubusercontent.com/u/885946?v=4)](https://github.com/sustmi "sustmi (14 commits)")[![PetrHeinz](https://avatars.githubusercontent.com/u/10008612?v=4)](https://github.com/PetrHeinz "PetrHeinz (9 commits)")[![vitek-rostislav](https://avatars.githubusercontent.com/u/10401898?v=4)](https://github.com/vitek-rostislav "vitek-rostislav (3 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")[![msshopsys](https://avatars.githubusercontent.com/u/128610012?v=4)](https://github.com/msshopsys "msshopsys (1 commits)")[![sadovnik](https://avatars.githubusercontent.com/u/5960795?v=4)](https://github.com/sadovnik "sadovnik (1 commits)")

---

Tags

phpstorminspectioncode quality

### Embed Badge

![Health badge](/badges/shopsys-phpstorm-inspect/health.svg)

```
[![Health](https://phpackages.com/badges/shopsys-phpstorm-inspect/health.svg)](https://phpackages.com/packages/shopsys-phpstorm-inspect)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.9k82.2M7.7k](/packages/vimeo-psalm)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k16.7M1.0k](/packages/phpro-grumphp)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k28.9M2.4k](/packages/infection-infection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
