PHPackages                             lenny4/php-swtich-case - 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. lenny4/php-swtich-case

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

lenny4/php-swtich-case
======================

Switch string between (camel case, snake case, kebab case, pascal case, upper case)

v1.0.1(4y ago)0883↓100%[2 PRs](https://github.com/Lenny4/php-swtich-case/pulls)MITPHPPHP &gt;=7.1

Since Feb 4Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Lenny4/php-swtich-case)[ Packagist](https://packagist.org/packages/lenny4/php-swtich-case)[ Docs](https://github.com/lenny4/php-swtich-case)[ GitHub Sponsors](https://github.com/Lenny4)[ RSS](/packages/lenny4-php-swtich-case/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (5)Used By (0)

Switch string between: camel case, snake case, kebab case, pascal case
======================================================================

[](#switch-string-between-camel-case-snake-case-kebab-case-pascal-case)

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

[](#installation)

You can install the package via composer:

```
composer require lenny4/php-swtich-case
```

Usage
-----

[](#usage)

```
$newString = Lenny4\SwtichCase::change('myStringInCamel', Lenny4\SwtichCase::KEBAB_CASE); // my-string-in-camel
```

Available cases:

- `Lenny4\SwtichCase::CAMEL_CASE`
- `Lenny4\SwtichCase::SNAKE_CASE`
- `Lenny4\SwtichCase::KEBAB_CASE`
- `Lenny4\SwtichCase::PASCAL_CASE`

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

You can launch this command to automatically create test if you create a new Case:

```
php src/generate-test.php
```

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Alexandre Beaujour](https://github.com/Lenny4)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

1556d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2cbee099fb53984f8213abf56cffa9eb99f8750ab08863a91311152bef562091?d=identicon)[lenny4](/maintainers/lenny4)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (11 commits)")[![Lenny4](https://avatars.githubusercontent.com/u/25544892?v=4)](https://github.com/Lenny4 "Lenny4 (9 commits)")

---

Tags

Lenny4php-swtich-case

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/lenny4-php-swtich-case/health.svg)

```
[![Health](https://phpackages.com/badges/lenny4-php-swtich-case/health.svg)](https://phpackages.com/packages/lenny4-php-swtich-case)
```

PHPackages © 2026

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