PHPackages                             kiryi/pathyi - 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. kiryi/pathyi

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

kiryi/pathyi
============

Simple path formatter.

1.0.1(6y ago)0705GPL-3.0-or-laterPHPPHP ^7.4

Since Apr 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/KiryiMONZTA/pathyi)[ Packagist](https://packagist.org/packages/kiryi/pathyi)[ Docs](https://kiryi.net/)[ RSS](/packages/kiryi-pathyi/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (5)

Kiryi's PATHYI
==============

[](#kiryis-pathyi)

A simple path formatter.

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

[](#installation)

```
composer require kiryi/pathyi
```

Usage
-----

[](#usage)

```
$pathyi = new \Kiryi\Pathyi\Formatter();
$path = $pathyi->format($path);
```

Method Definition *format*
--------------------------

[](#method-definition-format)

```
format(string $path, bool $leadingSlash = false, bool $trailingSlash = false): string
```

### Parameters

[](#parameters)

**path**
The path to format. If only backslashes appearing, path will be returned with leading/trailing backslashes. If not, forward slashes are used.

**leadingSlash**
Defines if the returned path starts with a slash (true) or not (false, default).

**trailingSlash**
Defines if the returned path ends with a slash (true) or not (false, default).

### Return Values

[](#return-values)

Returns the formatted path as a string.

Example
-------

[](#example)

```
$path = '/this/is/my/path';
$pathyi = new \Kiryi\Pathyi\Formatter();

$path = $pathyi->format($path);
// $path is now 'this/is/my/path'

$path = $pathyi->format($path, true);
// $path is now '/this/is/my/path'

$path = $pathyi->format($path, false, true);
// $path is now 'this/is/my/path/'
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~20 days

Total

2

Last Release

2206d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ffe67def05c2db0488d5cb9447c425a765764752c0a2cb9e0a254073ac1c25d?d=identicon)[Kiryi](/maintainers/Kiryi)

---

Top Contributors

[![oxSteven](https://avatars.githubusercontent.com/u/57273424?v=4)](https://github.com/oxSteven "oxSteven (5 commits)")

### Embed Badge

![Health badge](/badges/kiryi-pathyi/health.svg)

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

###  Alternatives

[slushie/laravel-assetic

Assetic support for Laravel 4

3717.0k](/packages/slushie-laravel-assetic)[welp/ical-bundle

Symfony Bundle to manage .ics iCal file (creating and eventually reading)

10114.3k](/packages/welp-ical-bundle)

PHPackages © 2026

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