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:----XNE9WISqAJbYRYqf1AkuWWoBcN74TOimIaMdHF+r25lKD6Y2/+btzMSG3Rtrn5vzq4Ttk96GR8XyCwEUvGT/nR4MJ9o/boESMF59guF3Hl+x5ihQmtRiPEjKQMvTQHZsAa+/8qUAZyXudF/BK8dFx3vUyNO6xidCPoHrDYblbruruKWytt/5o8nftsSoL1pPdz74idbf17x/9/YcjX0Ut7nCAq20iOMpAtU6fXAhSAA3Bu9cIv5SNfs64+bdkVI6A9vUHdVQ8AJSBPePkb74KfOW6gsb89GoUhyK5wgXA9p54i6bIlFdZU47kTVnkD1hQYjXyUwHs+eIwv6VveBWHgyQZOKuvnpbOYjmwi1ApiYn1qJqJNT6liLmW5IlDzSdFSREuztaInIqxOg0BvbEtH+ZHqpVDVqqjWxZOyxo7wt6Is2dhfcIxm5MXv3NMrI6BjbI7wZFg/E66TMujM7qJb8loLYg0tzd0k5kzdEZUtxPkr59xhDLscZJJfD5G/JMECqahXAEEQfcwdvc3ldZ8w4uVo1EmwQNfVGS2QlIIfc9Mr0xZUkhFgR5RjstkgXN2uESr4Aze6hpIgyzxsySjexsZV8KZ4Da9cninSfgi/wja9tqDr19eDAgM2HOT7HArBpnlrHcVkqJw/lMZ+jQZsZYjqh3+t0irhLdQa7ctFI=----ATTACHMENT:----NjU0NTQzMjAxMDg2NTg5NSA5Mzk4NDI4MTY4NzAxNTAxIDg0OTU4MDcxOTI2OTU5NTQ=