original_string: protected function isNestedCriteria(array $criterionData): bool
      {
          $isValid = true;
  
          foreach ($criterionData as $key => $possibleCriterion) {
              $isValid = $isValid &&
                  (
                      (is_int($key) && is_array($possibleCriterion)) ||
                      ($key === Criterion::BOOLEAN && in_array($possibleCriterion, ['and', 'or']))
                  );
          }
  
          return $isValid;
      }
code: protected function isNestedCriteria(array $criterionData): bool
      {
          $isValid = true;
  
          foreach ($criterionData as $key => $possibleCriterion) {
              $isValid = $isValid &&
                  (
                      (is_int($key) && is_array($possibleCriterion)) ||
                      ($key === Criterion::BOOLEAN && in_array($possibleCriterion, ['and', 'or']))
                  );
          }
  
          return $isValid;
      }
code_tokens: protected function isNestedCriteria ( array $ criterionData ) : bool { $ isValid = true ; foreach ( $ criterionData as $ key => $ possibleCriterion ) { $ isValid = $ isValid && ( ( is_int ( $ key ) && is_array ( $ possibleCriterion ) ) || ( $ key === Criterion :: BOOLEAN && in_array ( $ possibleCriterion , [ 'and' , 'or' ] ) ) ) ; } return $ isValid ; }
docstring: Shows whether given criterion data is nested.
  
  @param array $criterionData Criterion data to check
  
  @return boolean
docstring_tokens: Shows whether given criterion data is nested .