# auto-alt-text/trunk/phpstan-bootstrap.php

Auto Alt Text, version trunk. 33 lines.

- Page: https://pluginprobe.com/plugins/auto-alt-text/trunk/code/phpstan-bootstrap.php
- Raw: https://pluginprobe.com/plugins/auto-alt-text/trunk/raw/phpstan-bootstrap.php
- Modified: 2026-08-24T12:55:46+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/auto-alt-text/trunk/code/phpstan-bootstrap.php#L10-L20`.

```php
<?php
/**
 * PHPStan bootstrap file
 *
 * This file defines constants that are normally defined in the main plugin file
 * to allow PHPStan to analyze the code without errors.
 */

// Define plugin constants for PHPStan
if (!defined('AATXT_FILE_ABSPATH')) {
    define('AATXT_FILE_ABSPATH', __DIR__ . '/auto-alt-text.php');
}

if (!defined('AATXT_ABSPATH')) {
    define('AATXT_ABSPATH', __DIR__);
}

if (!defined('AATXT_URL')) {
    define('AATXT_URL', 'https://example.com/wp-content/plugins/auto-alt-text/');
}

if (!defined('AATXT_LANGUAGES_RELATIVE_PATH')) {
    define('AATXT_LANGUAGES_RELATIVE_PATH', 'auto-alt-text/languages/');
}

// Stub for the WP-CLI base class, not included in the WordPress stubs,
// so PHPStan can analyze src/App/CLI/AutoAltTextCommand.php.
if (!class_exists('WP_CLI_Command')) {
    class WP_CLI_Command
    {
    }
}

```
