original_string: protected function findMiddlewareFromFile($file)
      {
          $filename = pathinfo($file, PATHINFO_FILENAME);
  
          foreach ($this->middleware as $alias => $class) {
              if (strpos($class, $filename) !== false) {
                  return $alias;
              }
          }
      }
code: protected function findMiddlewareFromFile($file)
      {
          $filename = pathinfo($file, PATHINFO_FILENAME);
  
          foreach ($this->middleware as $alias => $class) {
              if (strpos($class, $filename) !== false) {
                  return $alias;
              }
          }
      }
code_tokens: protected function findMiddlewareFromFile ( $ file ) { $ filename = pathinfo ( $ file , PATHINFO_FILENAME ) ; foreach ( $ this -> middleware as $ alias => $ class ) { if ( strpos ( $ class , $ filename ) !== false ) { return $ alias ; } } }
docstring: Find the middleware alias from the file.
  
  @param  string $file
  @return string|null
docstring_tokens: Find the middleware alias from the file .