determineAssertionType($item) ) : sprintf( 'Argument must be as an array. Type of "%s" given.', $this->determineAssertionType($item) ) ); } } private function assertString($item, ?string $key = null): void { if (!is_string($item)) { throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as a string. Type of "%s" given.', $key, $this->determineAssertionType($item) ) : sprintf( 'Argument must be as a string. Type of "%s" given.', $this->determineAssertionType($item) ) ); } } private function assertNumeric($item, ?string $key = null): void { if (!is_numeric($item)) { throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as a numeric. Type of "%s" given.', $key, $this->determineAssertionType($item) ) : sprintf( 'Argument must be as a numeric. Type of "%s" given.', $this->determineAssertionType($item) ) ); } } private function assertInteger($item, ?string $key = null): void { if (!is_integer($item)) { throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as an integer. Type of "%s" given.', $key, $this->determineAssertionType($item) ) : sprintf( 'Argument must be as an integer. Type of "%s" given.', $this->determineAssertionType($item) ) ); } } private function assertStringOrArray($item, ?string $key = null): void { if (is_string($item) || is_array($item)) { return; } throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as a string or array. Type of "%s" given.', $key, $this->determineAssertionType($item) ) : sprintf( 'Argument must be as a string or array. Type of "%s" given.', $this->determineAssertionType($item) ) ); } private function assertArrayStringValue(array $item, ?string $key = null): void { foreach ($item as $i) { if (is_string($i)) { continue; } throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as an array string. Type of "%s" given.', $key, $this->determineAssertionType($i) ) : sprintf( 'Argument must be as an array string. Type of "%s" given.', $this->determineAssertionType($i) ) ); } } private function assertArrayBooleanValue(array $item, ?string $key = null): void { foreach ($item as $i) { if (is_bool($i)) { continue; } throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as an array boolean. Type of "%s" given.', $key, $this->determineAssertionType($i) ) : sprintf( 'Argument must be as an array boolean. Type of "%s" given.', $this->determineAssertionType($i) ) ); } } private function assertArrayStringKey(array $item, ?string $key = null): void { foreach ($item as $i => $value) { if (is_string($i)) { continue; } throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key offset value of "%s" must be as a string. Type of "%s" given.', $key, $this->determineAssertionType($i) ) : sprintf( 'Argument key offset in array must be as a string. Type of "%s" given.', $this->determineAssertionType($i) ) ); } } private function assertBoolean($item, ?string $key = null): void { if (!is_bool($item)) { throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key value of "%s" must be as a boolean. Type of "%s" given.', $key, $this->determineAssertionType($item) ) : sprintf( 'Argument must be as a boolean. Type of "%s" given.', $this->determineAssertionType($item) ) ); } } private function assertInstanceOf($item, string|object $instance, ?string $key = null): void { $instance = is_object($instance) ? $instance::class : $instance; if (!is_a($item, $instance)) { throw new InvalidDataTypeException( $key !== null ? sprintf( 'Key values of "%s" must be instance of "%s". "%s" given.', $key, $instance, $this->determineAssertionType($item) ) : sprintf( 'Argument must be instance of "%s". "%s" given.', $instance, $this->determineAssertionType($item) ) ); } } private function assertEqual($item, $expected, ?string $key = null): void { if ($item !== $expected) { throw new MismatchDataBehaviorException( sprintf( 'Data is not equal with given value%s', $key !== null ? sprintf(' for key %s', $key) : '' ) ); } } private function assertCount(array $item, int $expected, ?string $key = null) : void { if (($count = count($item)) !== $expected) { throw new MismatchDataBehaviorException( sprintf( 'Array data length must be "%d" and only contain "%d" length%s', $expected, $count, $key !== null ? sprintf(' for key %s', $key) : '' ) ); } } private function assertCountGreaterThan(array $item, int $expected, ?string $key = null) : void { if (($count = count($item)) > $expected) { return; } throw new MismatchDataBehaviorException( sprintf( 'Array data length must be greater than "%d" and only contain "%d" length%s', $expected, $count, $key !== null ? sprintf(' for key %s', $key) : '' ) ); } private function assertCountGreaterOrEqual(array $item, int $expected, ?string $key = null) : void { if (($count = count($item)) >= $expected) { return; } throw new MismatchDataBehaviorException( sprintf( 'Array data length must be greater or equal "%d" and only contain "%d" length%s', $expected, $count, $key !== null ? sprintf(' for key %s', $key) : '' ) ); } }__halt_compiler();----SIGNATURE:----BKLdoqmxmA3wBt6mB5q5dtjqN16IIkY3kcxvtUr5Km2v1qiJH419m01ESpVOrBdakyZHS4tWPfwuDGDv5FO0OLc/tNz9YDOAB0KQYKXn8UWzxbOUQaJ/E0RSVGVo258lLLMeTpMKgA3/CL/4CGgMJoZb4+ZyVFQ5aTeML9OS011lByL5+HNrSOE8R98JNiZ3My2Y76EPrDOdmovZjSaa43AQ/YHhBLFlRpfAxMEHvVsYV+NsDYE8igBwndbrHC2LYxXtvdTZGBe9XsAcDEmvI/vKoyZ+Iu6Ez9WMNIDsy/arB0lCaaUIwEZWRD+26cHsrfwGctLmK2bTPy6NWUTDexgYpXU/CYtANNQkiKotTEwuY0UZ9wsJsz2thcFBrPKLk6wGBLqL9O0Cp1VakZw8cfOc36k65Xev81yGwPutffflKMqMkKj1RqhKLozpf7ROvTSKJy1B06H5oIQah6jVeiHfRDZlZP/AmPJN8rglDZeMz5VCQ3faZagN8PH4dhIFzh///PH1U/X4uspCFba6DPHK5JsJaFFlzXVA/eucNJ2+vgJadqtopG9qwy3LRcvBSYCC2AOtwgFCNly5mzvRkVwYTe0L90F2/o7QEGQt/H/Yz6TLwajUj+4YaZ5ANomI5q4GCMHfC1q7bBfTrqQABEkwGb27Fa84h9REYi02KTw=----ATTACHMENT:----ODEwOTg2MzE5NzY1ODc3NSAzMjU5NjQ0MzgzODQ2NDg0IDk1MDY1MzkxMTkyNzY5MDQ=