Source of file StringWrapper.php
Size: 0,798 Bytes - Last Modified: 2019-12-05T15:38:46-05:00
../src/StringWrapper.php
1234567891011121314151617181920212223242526272829303132333435363738 | <?php declare(strict_types=1); /** * Ion * * Building blocks for web development * * PHP version 7.2 * * @package Ion * @author Timothy J. Warren <tim@timshomepage.net> * @copyright 2015 - 2019 Timothy J. Warren * @license http://www.opensource.org/licenses/mit-license.html MIT License * @version 3.0.0 * @link https://git.timshomepage.net/aviat/ion */ namespace Aviat\Ion; use Aviat\Ion\Type\StringType; /** * Trait to add convenience method for creating StringType objects */ trait StringWrapper { /** * Wrap the String in the Stringy class * * @param string $str * @throws \InvalidArgumentException * @return StringType */ public function string($str): StringType { return StringType::create($str); } } // End of StringWrapper.php |