src/Container.php
/**
     * Validate an ID for the other methods.
     * @param mixed $id The ID to validate.
     * @return string
     * @throws \InvalidArgumentException The ID was no string or an empty string.
     */
Validate an ID for the other methods.
@param mixed $id The ID to validate.
@return string
@throws \InvalidArgumentException The ID was no string or an empty string.
Validate an ID for the other methods . @param mixed $id The ID to validate . @return string @throws \ InvalidArgumentException The ID was no string or an empty string .
protected function validateId($id): string
    {
        if (!is_string($id)) {
            throw new InvalidArgumentException('Expected ID to be a string!');
        }
        $resultId = trim($id);
        if ($resultId === '') {
            throw new InvalidArgumentException('Expected ID to have at least one character.');
        }
        return $resultId;
    }
protected function validateId ( $ id ) : string { if ( ! is_string ( $ id ) ) { throw new InvalidArgumentException ( 'Expected ID to be a string!' ) ; } $ resultId = trim ( $ id ) ; if ( $ resultId === '' ) { throw new InvalidArgumentException ( 'Expected ID to have at least one character.' ) ; } return $ resultId ; }
Validate an ID for the other methods.
Validate an ID for the other methods .