original_string: protected function loadFromFile($path)
      {
          if (!file_exists($path)) {
              throw new \Exception(sprintf('Map file "%s" does not exist.', $path));
          }
  
          $map = require($path);
          if (!is_array($map)
              || !is_array($map[Settings::ALPHABET_CYR])
              || !is_array($map[Settings::ALPHABET_LAT])
          ) {
              throw new \Exception(sprintf(
                  'Map file "%s" is not valid, should return an array with %s and %s subarrays.',
                  $path,
                  Settings::ALPHABET_CYR,
                  Settings::ALPHABET_LAT
              ));
          }
  
          return $map;
      }
code: protected function loadFromFile($path)
      {
          if (!file_exists($path)) {
              throw new \Exception(sprintf('Map file "%s" does not exist.', $path));
          }
  
          $map = require($path);
          if (!is_array($map)
              || !is_array($map[Settings::ALPHABET_CYR])
              || !is_array($map[Settings::ALPHABET_LAT])
          ) {
              throw new \Exception(sprintf(
                  'Map file "%s" is not valid, should return an array with %s and %s subarrays.',
                  $path,
                  Settings::ALPHABET_CYR,
                  Settings::ALPHABET_LAT
              ));
          }
  
          return $map;
      }
code_tokens: protected function loadFromFile ( $ path ) { if ( ! file_exists ( $ path ) ) { throw new \ Exception ( sprintf ( 'Map file "%s" does not exist.' , $ path ) ) ; } $ map = require ( $ path ) ; if ( ! is_array ( $ map ) || ! is_array ( $ map [ Settings :: ALPHABET_CYR ] ) || ! is_array ( $ map [ Settings :: ALPHABET_LAT ] ) ) { throw new \ Exception ( sprintf ( 'Map file "%s" is not valid, should return an array with %s and %s subarrays.' , $ path , Settings :: ALPHABET_CYR , Settings :: ALPHABET_LAT ) ) ; } return $ map ; }
docstring: Load map from file.
  
  @param  string $path path to map file
  @return array  map array
docstring_tokens: Load map from file .