<commit_before><?php

class ApplicationRoutes {
  private static $_path = "";
  private static $_draws = NULL;
  private static $_routes = [];

  public static function __callStatic(string $method, array $args) {
    if (in_array($method, [ 'get', 'post' ])) {
      // args ([0] => rule, [1] => controller#action, [2] => path)
      $args[2] =  ($args[2]) ? static::$_path . $args[2] : static::$_path;
      // call private method _get, _post
      $route = ApplicationRoutes::{"_$method"}(...$args);
      self::set_route($route);
    } else { throw new Exception("Beklenmedik bir method → " .  $method); }
  }

  public static function draw(callable $_functions) {
    // do not make dublicate draw function on config/routes.php
    if (!isset(self::$_draws)) {

      // router processing
      $_functions();
      // router processed

     // TEST
      // foreach (static::$_routes as $method => $routes) {
      //   echo "## <|> METHOD: $method<br/>";
      //   foreach ($routes as $route) {
      //     print_r($route); echo "<br/><br/>";
      //   }
      // }
      self::$_draws = TRUE;
    }

    $request_route = [ "_rule" => $_SERVER['REQUEST_URI'], "_method" => $_SERVER["REQUEST_METHOD"] ];<commit_msg>string ifadesi sorunu<commit_after><?php

class ApplicationRoutes {
  private static $_path = "";
  private static $_draws = NULL;
  private static $_routes = [];

  public static function __callStatic($method, array $args) {
    if (in_array($method, [ 'get', 'post' ])) {
      // args ([0] => rule, [1] => controller#action, [2] => path)
      $args[2] =  ($args[2]) ? static::$_path . $args[2] : static::$_path;
      // call private method _get, _post
      $route = ApplicationRoutes::{"_$method"}(...$args);
      self::set_route($route);
    } else { throw new Exception("Beklenmedik bir method → " .  $method); }
  }

  public static function draw(callable $_functions) {
    // do not make dublicate draw function on config/routes.php
    if (!isset(self::$_draws)) {

      // router processing
      $_functions();
      // router processed

     // TEST
      // foreach (static::$_routes as $method => $routes) {
      //   echo "## <|> METHOD: $method<br/>";
      //   foreach ($routes as $route) {
      //     print_r($route); echo "<br/><br/>";
      //   }
      // }
      self::$_draws = TRUE;
    }

    $request_route = [ "_rule" => $_SERVER['REQUEST_URI'], "_method" => $_SERVER["REQUEST_METHOD"] ];
{'fraction_non_alphanumeric': 0.1871679607682877, 'fraction_numerical': 0.004903964037597058, 'mean_word_length': 2.709090909090909, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1519973', 'n_tokens_mistral': 787, 'n_tokens_neox': 778, 'n_words': 191}