Ad
  • Custom User Avatar

    Try this test:
    $this->assertSame(getLengthOfMissingArray([1, [3,1,2]]), 0);

    Your function will return 2. But why? The function should return 0, because 1st item of the array is scalar value, not array.
    You don't check that the array contains only arrays.