original_string: public static function fromArray(array $value)
      {
          $language = null;
          $culture = null;
  
          if (!empty($value['language'])) {
              $language = $value['language'];
          } elseif ($value[0]) {
              $language = $value[0];
          }
  
          if (!empty($value['culture'])) {
              $culture = $value['culture'];
          } elseif ($value[1]) {
              $culture = $value[1];
          }
  
          return new static($language, $culture);
      }
code: public static function fromArray(array $value)
      {
          $language = null;
          $culture = null;
  
          if (!empty($value['language'])) {
              $language = $value['language'];
          } elseif ($value[0]) {
              $language = $value[0];
          }
  
          if (!empty($value['culture'])) {
              $culture = $value['culture'];
          } elseif ($value[1]) {
              $culture = $value[1];
          }
  
          return new static($language, $culture);
      }
code_tokens: public static function fromArray ( array $ value ) { $ language = null ; $ culture = null ; if ( ! empty ( $ value [ 'language' ] ) ) { $ language = $ value [ 'language' ] ; } elseif ( $ value [ 0 ] ) { $ language = $ value [ 0 ] ; } if ( ! empty ( $ value [ 'culture' ] ) ) { $ culture = $ value [ 'culture' ] ; } elseif ( $ value [ 1 ] ) { $ culture = $ value [ 1 ] ; } return new static ( $ language , $ culture ) ; }
docstring: Parses the given array and returns its Locale representation.
  
  @param array $value The value to parse.
  @return Locale The Locale representation of the given value or a null value.
docstring_tokens: Parses the given array and returns its Locale representation .