/** * @param mixed $id * * @throws IdentifierArgumentIsNotScalar */ protected function guardType($id) { if (!Str::isValid($id)) { throw new IdentifierArgumentIsNotScalar(gettype($id)); } }
/** * @dataProvider splitStringProvider */ public function testGetWords($string, array $expected_words) { $str = new Str($string); $this->assertEquals($expected_words, $str->getWords()); }