original_string: protected function extractDistinctValues($attribute)
      {
          $attributeData = ValidationData::extractDataFromPath(
              ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
          );
  
          $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#'));
  
          return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
              return (bool) preg_match('#^'.$pattern.'\z#u', $key);
          });
      }
code: protected function extractDistinctValues($attribute)
      {
          $attributeData = ValidationData::extractDataFromPath(
              ValidationData::getLeadingExplicitAttributePath($attribute), $this->data
          );
  
          $pattern = str_replace('\*', '[^.]+', preg_quote($attribute, '#'));
  
          return Arr::where(Arr::dot($attributeData), function ($value, $key) use ($pattern) {
              return (bool) preg_match('#^'.$pattern.'\z#u', $key);
          });
      }
code_tokens: protected function extractDistinctValues ( $ attribute ) { $ attributeData = ValidationData :: extractDataFromPath ( ValidationData :: getLeadingExplicitAttributePath ( $ attribute ) , $ this -> data ) ; $ pattern = str_replace ( '\*' , '[^.]+' , preg_quote ( $ attribute , '#' ) ) ; return Arr :: where ( Arr :: dot ( $ attributeData ) , function ( $ value , $ key ) use ( $ pattern ) { return ( bool ) preg_match ( '#^' . $ pattern . '\z#u' , $ key ) ; } ) ; }
docstring: Extract the distinct values from the data.
  
  @param  string  $attribute
  @return array
docstring_tokens: Extract the distinct values from the data .