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:----KGIJQpDx0elcOjN6HnTkO1/8+AWDpfTR+BWPCul7Vo4DoQ7RcPnpDZGfmn/ik/iT2Tmzhy8ZMKsrw1Tvz6CYBrE95GHYCa4dqvWKFn5NBUiWZRQ8E0jah9LYPgZDMZuAhzz029ds7irwvg4AUZnXfRxSMPtdJB5HHRop1PAUrPhVTV7j5TsM6aytxP5h13XLMl0bRL3XWJs6Qr+qyZk1+mGO11bfjQndtoY2LxUp5bNVbj8C0n6Tvy9CbxETloGb1GE/kVxraevjIovFjYJEn+oWQvm+ud8zHUI6WP4611xQuQkXSo0s0NesQoJYzjRuHSTRacAtobHCS6+LRu9YawAJHP7zcN6k8XbQ41V5N6Aae9IoKtY+W5CtZCpKk3+aaSwp1Z11KkfIaniqY0O9RuxmVVbfS8LNmTtkQahbqqNngFCtZdcTr2hoVRqU6M+a9TuFk6BcSGYHNz/fQoao6eyrLEOFCJNCpd1/LFsbSswlWoubH9CPWRdGPTlYjA+F5qcUr8tO2YG+LwA8G8QvGZy/XM1R+flIdXNeRsLMd7STXhljTzgHxPUa0tojtAQl6xdqtUY5DTyqlVsvT3WLuICNGNUr6d7bx2g5lVhoKkR4FwI0YGGer/FNDiDESlaC4ivlCYbAdyPIPrzF8nGNu2HG6w8emARjUbGJjAofoHY=----ATTACHMENT:----NTcyNjEwMTMzNDk3NDQ1IDY4NTg3NTUzNDU0Mjk2NyAyMzc2MjI4OTA4MDIyMjU4