micaherne/phpstan-moodle

Rules and utilities for using PHPStan on Moodle code.

Installs: 13

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 2

Type:phpstan-extension

dev-main 2024-04-23 20:40 UTC

This package is auto-updated.

Last update: 2024-04-23 20:41:41 UTC


README

This is a plugin for PHPStan that enables analysis of Moodle code.

It currently only supports bootstrapping the classloader - there are no rules as yet.

Installation

To use this plugin, install it with phpstan extension-installer:

Otherwise, require it in Composer:

composer require --dev micaherne/phpstan-moodle

Then create a phpstan.neon file in the root of your project with the following contents:

includes:
    - vendor/micaherne/phpstan-moodle/extension.neon

Usage

Add the following to your phpstan.neon file:

parameters:
    moodle:
        rootDirectory: /path/to/moodle

The rootDirectory parameter must be an absolute path.