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:----SoKioBkHTAma8yBNafSFYiNAow7d8CaxOMNVQq/U9HF5k2RiynbkTTsujxJ/dOJI64bQRs3AWjEtKOjvAV4DjmMOz7m3Em+E4jsvWSZr061rdlH0FbnMmVD5G+BrWPwVtmNJ8r0V6lGKNA/rbx4OCGUpjcy3AVfIb4U3B/x/+RBE/WVSIm/7d1Ag8SQnI9SAHG6uKfdjgDMSo7LdFNRkrSaQTLhIoxk46n67o4YgSIkYBQaJx/wuE+VOvrxsU/WrgELmp8d5I6Zn3ru+fIAjm8l8PaTm5O6x3voUy6gwrnJTJmQSPddk4oY7Z6fFr+eIAu0KMazqrhc5HGbEJGbWXkjYQi/jEr/3VnpJMYE204Hv7bRHALDoh07o08q12xTmm1NNX/zm4S4RnhPl+g5YYf0Q80TUjWgnke2PbGeTQ6Lgliv3FvRYXf5rXy0nuvw7cggtaWGVNGLZi23Wm5jw9DpTom+GjGGpLZNbv9QB8l7O4D08BiOTtY8CKdZTWExYcuiNfqQx9u4S1fmyqG+zXTvk33Bg/a9CBqxlwNM+sTvzeVGi65NcVRMPY7Jxs+c2LU6hwbwPzjcDVpyF/h5ziXZn/ioCyeYsmVeaXt5Qmlh8A21rXb8AwCoKj8gH7JL6iaZRrLHAs2Qt32dd9/3leHgvbUKQGivLrxZCSToojRs=----ATTACHMENT:----NjkxOTI4MzEwODM5ODEzMSA0OTI2NDY0Njg4NTY1Nzg5IDE4NjY0Njc5NjM2MzkyNjM=