"PHP" / Говнокод #19067 Ссылка на оригинал

0

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
  15. 15
  16. 16
  17. 17
  18. 18
  19. 19
$routeAnalyze = new TaxiRouteAnalyzerLite();
$options = array(
	'fromLat'     => $fromLat,
	'fromLon'     => $fromLon,
	'toLat'       => $toLat,
	'toLon'       => $toLon,
	'cityPolygon' => $this->cityPolygon,
	'costPos'     =>$costPos,
	'costPosOut'  => $costPosOut,
	'costKm'      => $costKm,
	'costKmOut'   => $costKmOut,
	'includedKm'  => $includedKm,
	'meas'        => 'distance',
	'costKmOutIn' => $costKmOutIn,
);
$this->writeLog('options', $options);
$cost = $routeAnalyze->calcCost($fromLat, $fromLon, $toLat, $toLon, $this->cityPolygon, $costPos, $costPosOut, $costKm, $costKmOut, $includedKm, 'distance', $costKmOutIn);
$this->writeLog('cost', $cost);
return $cost;

Неужели нужно создавать отдельно переменную чтобы вывести в лог, а при этом метод должен быть таким громоздким?!

Запостил: akanit akanit, (Updated )

Комментарии (2) RSS

  • Я тоже часто так делаю

    public static function hyphenate($str) {
            $new_str = mb_strtolower(str_replace(" ", "-", $str));
            return $new_str;
        }


    $view_opts = [
          'sidebar' => View::create('shade/sidebar', [
            'types' => $types,
            'type' => $type]),
          'content' => View::create('shade/type', [
            'type' => $type
            ]),
          ];
        $this->set_main_view(new View('layout/with_sidebar', $view_opts));
    Ответить

Добавить комментарий

Из-за тебя ушел bormand, guest!

    А не использовать ли нам bbcode?


    8