{"id":33981483,"url":"https://github.com/amitjoc/breakify","last_synced_at":"2025-12-13T03:40:47.191Z","repository":{"id":317989773,"uuid":"1069596917","full_name":"amitjoc/breakify","owner":"amitjoc","description":"Breakify is a lightweight PHP utility for managing and transforming line breaks across platforms and formats. Whether you're normalizing text input, preparing content for HTML output, or ensuring consistent formatting in logs or CLI tools, Breakify offers a clean, expressive API to handle it all.","archived":false,"fork":false,"pushed_at":"2025-10-29T17:17:53.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-29T19:13:50.773Z","etag":null,"topics":["cmd","command-line","php7","php8","powershell","shell"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amitjoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-04T08:40:19.000Z","updated_at":"2025-10-29T17:17:56.000Z","dependencies_parsed_at":"2025-10-04T11:32:59.211Z","dependency_job_id":"a30455d2-50f6-43ac-bc35-6e3e4bdedb6b","html_url":"https://github.com/amitjoc/breakify","commit_stats":null,"previous_names":["amitjoc/breakify"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amitjoc/breakify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoc%2Fbreakify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoc%2Fbreakify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoc%2Fbreakify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoc%2Fbreakify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amitjoc","download_url":"https://codeload.github.com/amitjoc/breakify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amitjoc%2Fbreakify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27699645,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmd","command-line","php7","php8","powershell","shell"],"created_at":"2025-12-13T03:40:46.491Z","updated_at":"2025-12-13T03:40:47.180Z","avatar_url":"https://github.com/amitjoc.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Breakify  \nBreakify is a lightweight PHP utility for managing and transforming line breaks across platforms and formats.\nWhether you're normalizing text input, preparing content for HTML output, or ensuring consistent formatting in \nlogs or CLI tools, Breakify offers a clean, expressive API to handle it all.\n\n# Author\n\n**Amit Joshi**  \nBackend Developer | PHP \u0026 JavaScript Specialist  \nGitHub: [@amitjoc](https://github.com/amitjoc)  \nLinkedIn: [@amitjoc](https://www.linkedin.com/in/amitjoc/)\n\n![PHP Version](https://img.shields.io/badge/PHP-7.4%2B-blue)\n![License](https://img.shields.io/github/license/amitjoc/breakify)\n![Build Status](https://img.shields.io/github/actions/workflow/status/amitjoc/breakify/php.yml)\n![Code Style](https://img.shields.io/badge/code%20style-PSR12-green)\n![Issues](https://img.shields.io/github/issues/amitjoc/breakify)\n![Stars](https://img.shields.io/github/stars/amitjoc/breakify?style=social)\n\n\n# Table of Contents\n- [Author](#author)\n- [Installation](#installation)\n- [Environment](#environment)\n- [Feature List](#feature-list)\n- [Examples](#example-for-web)\n- [CLI Usage](#example-for-cli)\n- [Task List](#task-list)\n- [Coding Standards](#coding-standard)\n\n# Installation\n\n\u003e Download the Breakify library\n```php\n composer require amitjoshi/breakify\n```\n\u003e Include composer `autoload` file  \n```php \n include_once dirname(__DIR__) . \"/vendor/autoload.php\"; \n ```\n\u003e Create a Breakify object \n```php\n  $web = new Breakify();\n```\n\n# Environment\n- `WEB`: Use when a script runs only in browser-based environments.\n- `CLI`: Use when a script runs only in command-line environments.\n- `BOTH`: Use when the environment is dynamic or unknown.\n\n\n# Feature List\n\n- [Web Example](#example-for-web) and [CLI Example](#example-for-cli) \n- `beap()` (bell sound for CLI)\n- Normalize or convert line breaks across different platforms `(Windows \\r\\n, Unix \\n, Mac \\r)`\n- Handle other `escape character` too for cli (`in progress`)\n\n## Example for WEB\n\nWhen we already know that our `script` only executed on `WEB` environment\n\n- print `br tag`\n```php\n  $web = new Breakify()\n  $web-\u003epbr();        // OUTPUT: Print's `break tag` directly\n  $web-\u003ephr();        // OUTPUT: \u003chr /\u003e\n  $web-\u003ephrDashed();  // OUTPUT: ------- \n  $web-\u003ephrDotted();  // OUTPUT: .......\n  $web-\u003ephrRidge();   // OUTPUT: _______\n  $web-\u003ephrDouble();  // OUTPUT: =======\n```\n\n## Example for CLI\nWhen we already know that our `script` only executed on `cli` environment\n\n```php\n$cliBreak = new Breakify();\n\n$cliBreak-\u003egetLineBreak()   //  returns `PHP_EOL`\n$cliBreak-\u003epNewLine()       //  echoes single line break\n$cliBreak-\u003epNewLine(true)   //  echoes double line break\n```\n- print carriage return also `\\r`\n- print text withing the box with desired character like —, = (in progress)\n- Make a bell sound `beap()` from php (available only in cli mode)\n\n\u003e [!IMPORTANT]  \n\u003e 1. `functions` with `p` prefix directly give output like `pbr()`,`phr()`,`pLineBreak()`  \n\n# Task List\n \n## Default\n\n- [x] `CLI`: Default `LineBreak` is set to `PHP_EOL` \n- [x] `WEB`: Default `LineBreak` is `\u003cbr /\u003e`\n\n## Functions\n- [x] `isCliEnv()` function will check is execution environment. return `true` for cli else `false`\n- [x] `exeEnvType()` Type `WEB | CLI`. it will return the output accordingly \n\n## Functions for `web`\n\n- [x] print break tag  `pbr()`\n- [x] print horizontal tag  `phr()`\n- [x] print `dashed line` use function `phrDashed()`  \n- [x] print `dotted line` use function `phrDotted()`\n- [x] print `ridge line` use function `phrRidge()`\n- [x] print `double line` use function `phrDouble()`\n- [ ] custom hr line width and height and center also with in build stylesheet\n\n## Coding Standard\n\n- [x] PSR 4 or PSR12","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoc%2Fbreakify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famitjoc%2Fbreakify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famitjoc%2Fbreakify/lists"}