szepeviktor/empty-string

Global helper to check whether a value is a non-empty string.

Maintainers

Package info

github.com/szepeviktor/empty-string

pkg:composer/szepeviktor/empty-string

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-06-07 03:35 UTC

This package is auto-updated.

Last update: 2026-06-07 03:41:32 UTC


README

Minimal Composer package that exposes one global helper:

is_non_empty_string(mixed $value): bool

It returns true only when the value is a string and not exactly ''.

Installation

composer require szepeviktor/empty-string

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

is_non_empty_string('hello'); // true
is_non_empty_string('   ');   // true
is_non_empty_string('');      // false
is_non_empty_string(123);     // false

Contract

  • true for any string except ''
  • true for whitespace-only strings
  • false for all non-string values

Local QA

composer lint
composer phpunit
composer phpstan
composer qa