PHPackages                             supportpal/phpcpd2sarb - 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. supportpal/phpcpd2sarb

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

supportpal/phpcpd2sarb
======================

A tool to convert phpmd-phpcpd XML to sarb format.

v0.2.0(2y ago)19.4k↑39.3%1[1 PRs](https://github.com/supportpal/phpcpd2sarb/pulls)MITPHPPHP ^8.1

Since Jun 24Pushed 1y ago2 watchersCompare

[ Source](https://github.com/supportpal/phpcpd2sarb)[ Packagist](https://packagist.org/packages/supportpal/phpcpd2sarb)[ RSS](/packages/supportpal-phpcpd2sarb/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

 [![](https://camo.githubusercontent.com/568702860ea73eac69fe2ea233579b2b0ecf0e4a48e1da777f22a21b1fcb353f/68747470733a2f2f7777772e737570706f727470616c2e636f6d2f6173736574732f696d672f6c6f676f5f626c75655f736d616c6c2e706e67)](https://www.supportpal.com)
 A tool to convert phpmd-phpcpd XML to sarb to facilitate the creation of a PHPCPD baseline.

[![Build Status](https://github.com/supportpal/phpcpd2sarb/actions/workflows/test.yml/badge.svg)](https://github.com/supportpal/phpcpd2sarb/actions)[![Latest Stable Version](https://camo.githubusercontent.com/168992471c26ad21ad4f775f206b0616e16182f74a6997a722561f876d8bf867/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737570706f727470616c2f7068706370643273617262)](https://packagist.org/packages/supportpal/phpcpd2sarb)[![License](https://camo.githubusercontent.com/6593f4b2df87eb546ddf1b9d1f2c4b312a539f3d20f47c33d620f2256edfe58a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f737570706f727470616c2f7068706370643273617262)](https://packagist.org/packages/supportpal/phpcpd2sarb)

---

Installation
============

[](#installation)

```
composer require --dev supportpal/phpcpd2sarb
```

Usage
=====

[](#usage)

Generate a phpcpd report:

```
php phpcpd.phar --log-pmd phpcpd-output.xml src/
```

Convert the XML report to Sarb format:

```
php vendor/bin/phpcpd2sarb convert phpcpd-output.xml > /tmp/sarb-output.json

```

Use [dave-liddament/sarb](https://github.com/DaveLiddament/sarb) to create a baseline:

```
cat /tmp/sarb-output.json | php vendor/bin/sarb create --input-format="sarb-json" phpcpd.baseline

```

If you're using sarb `v0.x` the command syntax is different:

```
php vendor/bin/sarb create-baseline /tmp/sarb-output.json phpcpd.baseline sarb-json

```

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 58.3% 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.

###  Release Activity

Cadence

Every ~1018 days

Total

2

Last Release

818d ago

PHP version history (2 changes)v0.1.0PHP &gt;=7.2.5

v0.2.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/809d7ed0e9aa913afb9147041cb2e94ff4571d0227569e2ba315d1550e3eefa7?d=identicon)[bytestream](/maintainers/bytestream)

---

Top Contributors

[![bytestream](https://avatars.githubusercontent.com/u/1788397?v=4)](https://github.com/bytestream "bytestream (7 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![jshah4517](https://avatars.githubusercontent.com/u/602425?v=4)](https://github.com/jshah4517 "jshah4517 (2 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/supportpal-phpcpd2sarb/health.svg)

```
[![Health](https://phpackages.com/badges/supportpal-phpcpd2sarb/health.svg)](https://phpackages.com/packages/supportpal-phpcpd2sarb)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103519.9k53](/packages/friendsoftypo3-content-blocks)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

5186.0k18](/packages/phel-lang-phel-lang)[dagger/dagger

Dagger PHP SDK

261.1k](/packages/dagger-dagger)

PHPackages © 2026

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