PHPackages                             mralaminahamed/phpstan-surecart-stubs - 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. mralaminahamed/phpstan-surecart-stubs

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

mralaminahamed/phpstan-surecart-stubs
=====================================

SureCart function and class declaration stubs for static analysis.

00PHPCI failing

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/mralaminahamed/phpstan-surecart-stubs)[ Packagist](https://packagist.org/packages/mralaminahamed/phpstan-surecart-stubs)[ RSS](/packages/mralaminahamed-phpstan-surecart-stubs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

SureCart Stubs
==============

[](#surecart-stubs)

[![Latest Version](https://camo.githubusercontent.com/7ac7b320817dcfc55ff25a30b29704a41148bc9684092e0f0e36382bbec4c66a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d72616c616d696e6168616d65642f7068707374616e2d73757265636172742d73747562732e7376673f636f6c6f723d344343363145267374796c653d666c61742d737175617265)](https://packagist.org/packages/mralaminahamed/phpstan-surecart-stubs)[![Downloads](https://camo.githubusercontent.com/318672d17702999ea8eccb54380508e67fa9cf9ad2b9a49b1b02609db926bcf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d72616c616d696e6168616d65642f7068707374616e2d73757265636172742d73747562732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mralaminahamed/phpstan-surecart-stubs/stats)[![License](https://camo.githubusercontent.com/f231b68d0415b8e3c3b798c29c67e7ee7eef98257613c4638e48d97ea1040922/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d72616c616d696e6168616d65642f7068707374616e2d73757265636172742d73747562732e7376673f7374796c653d666c61742d737175617265)](./LICENSE)[![PHP Version](https://camo.githubusercontent.com/34f66358036f78b42ed5fa1333f8730c22e18559e9fe267cb22b7197df03c8ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d72616c616d696e6168616d65642f7068707374616e2d73757265636172742d73747562732e7376673f7374796c653d666c61742d737175617265)](./composer.json)

PHP stub declarations for the [SureCart](https://surecart.com) plugin to enhance IDE completion and static analysis capabilities. Generated using [php-stubs/generator](https://github.com/php-stubs/generator) directly from the source code.

Features
--------

[](#features)

- Complete function, class, and interface declarations
- Constant definitions for proper static analysis
- IDE autocompletion support
- PHPStan integration
- Regular updates with latest SureCart plugin versions

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- Composer for dependency management

Installation
------------

[](#installation)

### Via Composer (Recommended)

[](#via-composer-recommended)

```
composer require --dev mralaminahamed/phpstan-surecart-stubs
```

### Manual Installation

[](#manual-installation)

Download the stub files directly:

- [surecart-stubs.php](https://raw.githubusercontent.com/mralaminahamed/phpstan-surecart-stubs/main/surecart-stubs.php)
- [surecart-constants-stubs.php](https://raw.githubusercontent.com/mralaminahamed/phpstan-surecart-stubs/main/surecart-constants-stubs.php)

Basic Configuration
-------------------

[](#basic-configuration)

To use these stubs with PHPStan or your IDE, see our [Usage Guide](./docs/usage.md) for detailed instructions.

Package Structure
-----------------

[](#package-structure)

```
phpstan-surecart-stubs/
├── bin/                               # Scripts for generating and releasing stubs
│   ├── generate.sh                    # Stub generation script
│   └── release-latest-versions.sh    # Release automation script
├── configs/                           # Configuration files for stub generation
│   ├── bootstrap.php                  # PHPStan bootstrap with WP constants
│   └── finder.php                     # File finder configuration
├── surecart-constants-stubs.php       # Constants stub file
├── surecart-stubs.php                 # Main stubs file with classes and functions
├── phpstan.neon                       # PHPStan configuration
├── source/                            # Source for generating stubs
└── tests/                             # Test files

```

Development
-----------

[](#development)

### Generating Stubs

[](#generating-stubs)

```
composer generate
```

### Running Tests

[](#running-tests)

```
composer test
```

### Releasing a New Version

[](#releasing-a-new-version)

```
composer release
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](./LICENSE).

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34349365?v=4)[Al Amin Ahamed](/maintainers/mralaminahamed)[@mralaminahamed](https://github.com/mralaminahamed)

---

Top Contributors

[![mralaminahamed](https://avatars.githubusercontent.com/u/34349365?v=4)](https://github.com/mralaminahamed "mralaminahamed (24 commits)")

---

Tags

ecommercephpphp-stubsphpstanphpstan-stubsstatic-analysissurecartwordpress

### Embed Badge

![Health badge](/badges/mralaminahamed-phpstan-surecart-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/mralaminahamed-phpstan-surecart-stubs/health.svg)](https://phpackages.com/packages/mralaminahamed-phpstan-surecart-stubs)
```

PHPackages © 2026

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