use Org\Mxchange\CoreFramework\Stacker\Index\IndexableStack;
// Import SPL stuff
+use \InvalidArgumentException;
use \SplFileInfo;
/**
*
* @param $length Length of raw data
* @return $seekPosition Found next gap's seek position
+ * @throws InvalidArgumentException If the parameter is not valid
+ * @todo Unfinished work
*/
public function searchNextGap (int $length) {
- $this->partialStub('length=' . $length);
+ // Validate parameter
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-INDEX: length=%d - CALLED!', $length));
+ if ($length <= 0) {
+ // Throw IAE
+ throw new InvalidArgumentException(sprintf('length=%d is not valid', $length));
+ }
}
}