for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Part of SplTypes package.
*
* (c) Adrien Loyant <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Ducks\Component\SplTypes;
* The SplString class is used to enforce strong typing of the string type.
* @extends SplType<string>
* @psalm-api
class SplString extends SplType
{
* @var string
* @psalm-suppress InvalidClassConstantType
// phpcs:ignore Generic.NamingConventions.UpperCaseConstantName.ClassConstantNotUpperCase
protected const __default = '';
* {@inheritdoc}
* @param string $initial_value
* @SuppressWarnings(PHPMD.CamelCaseParameterName)
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
public function __construct(string $initial_value = self::__default)
parent::__construct($initial_value);
}
* @inheritdoc
final public function &__invoke(): string
/** @var string */
return $this->__default;