original_string: public function parseRestrictedAreas($areas)
      {
          if (is_string($areas) && !empty($areas))
          {
              $areas = trim($areas);
              $areas = explode(PHP_EOL, $areas);
          }
  
          return $this->filterOutArrayValues(
              $areas,
              function($val) {
                  $valid = preg_match('/^[\/\{\}a-z\_\-\?\=]{1,255}$/i', $val);
  
                  if (!$valid)
                  {
                      return false;
                  }
  
                  return true;
              }
          );
      }
code: public function parseRestrictedAreas($areas)
      {
          if (is_string($areas) && !empty($areas))
          {
              $areas = trim($areas);
              $areas = explode(PHP_EOL, $areas);
          }
  
          return $this->filterOutArrayValues(
              $areas,
              function($val) {
                  $valid = preg_match('/^[\/\{\}a-z\_\-\?\=]{1,255}$/i', $val);
  
                  if (!$valid)
                  {
                      return false;
                  }
  
                  return true;
              }
          );
      }
code_tokens: public function parseRestrictedAreas ( $ areas ) { if ( is_string ( $ areas ) && ! empty ( $ areas ) ) { $ areas = trim ( $ areas ) ; $ areas = explode ( PHP_EOL , $ areas ) ; } return $ this -> filterOutArrayValues ( $ areas , function ( $ val ) { $ valid = preg_match ( '/^[\/\{\}a-z\_\-\?\=]{1,255}$/i' , $ val ) ; if ( ! $ valid ) { return false ; } return true ; } ) ; }
docstring: Parse restricted areas to ensure they are valid even when created from a string
  
  @param array|string $areas
  
  @return array
docstring_tokens: Parse restricted areas to ensure they are valid even when created from a string