Skip to content

php-forge/helper

Repository files navigation

Collection of Helper for PHP.


PHPUnit Codecov Infection Psalm Psalm Coverage StyleCI

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist php-forge/helpers:"^0.1"

or add

"php-forge/helpers": "^0.1"

Usage

The repository contains a collection of utility functions designed to simplify common programming tasks in PHP.

Whether you're working on web development, data processing, or other projects, these helper functions can save you time and effort.

Converts a camelCase formatted string to snake_case

<?php

declare(strict_types=1);

use PHPForge\Helper\WordFormatter;

$word = WordFormatter::camelCaseToSnakeCase('date_birth');

Convert a snake_case formatted string to camelCase

<?php

declare(strict_types=1);

use PHPForge\Helper\WordFormatter;

$word = WordFormatter::snakeCaseToCamelCase('date_birth');

Converts a string to words with capitalized first letters

<?php

declare(strict_types=1);

use PHPForge\Helper\WordFormatter;

$word = WordFormatter::capitalizeToWords('Date Birth');

Generate ramdon pasword

<?php

declare(strict_types=1);

use PHPForge\Helper\Password;

$password = Password::generate(8);

Get all timezones

<?php

declare(strict_types=1);

use PHPForge\Helper\Timezone;

$timezones = Timezone::getAll();

Testing

Check the documentation testing to learn about testing.

Support versions

PHP81

License

The MIT License (MIT). Please see License File for more information.

Our social networks

Twitter

About

Collection of Helpers for PHP.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages