承接 garydavisonos/conditional-helpers 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

garydavisonos/conditional-helpers

最新稳定版本:2.0.1

Composer 安装命令:

composer require garydavisonos/conditional-helpers

包简介

A collection of helper functions to be used in conditional logic

README 文档

README

A collection of PHP helper functions to be used in conditional logic within projects.

Version License Dependencies

Table of Contents

Installation

To use these conditional helpers, simply install the package via Composer:

composer require garydavisonos/conditional-helpers

Functions

The following helper functions are available:

isArrayHasLength($array): Checks if an array has a length greater than zero.
isStringHasLength($string): Checks if a string has a length greater than zero.
isBooleanTrue($boolean): Checks if a value is a boolean true.
isBooleanFalse($boolean): Checks if a value is a boolean false.

Usage

Check if an array has a length greater than zero:

use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$array = [1, 2, 3];
$result = Helpers::isArrayHasLength($array); // Returns true

Check if a string has a length greater than zero

use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$string = "Hello, World!";
$result = Helpers::isStringHasLength($string); // Returns true

Check if a value is a boolean true

use GaryDavisonOs\ConditionalHelpers\ConditionalHelpers as Helpers;

$boolean = true;
$result = Helpers::isBooleanTrue($boolean); // Returns true

Contributing

Contributions are welcome! If you'd like to add a new helper function or improve an existing one, please submit a pull request.

License

This package is licensed under the MIT License.

统计信息

  • 总下载量: 100
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-04