garydavisonos/conditional-helpers 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固