Skip to content

Instantly share code, notes, and snippets.

@sergeylunev
Last active December 28, 2015 00:19
Show Gist options
  • Save sergeylunev/7412132 to your computer and use it in GitHub Desktop.
Save sergeylunev/7412132 to your computer and use it in GitHub Desktop.
Patterns of bad code
$base_path = str_replace($_SERVER['DOCUMENT_ROOT'], '' ,realpath(DIR_ROOT));
/**
* Set duration
*
* @param integer $duration
* @return Event
*/
public function setDuration($duration)
{
$this->duration = $duration;
//TODO: Это гребаный костыль, требует исправления и подставления в форму реального поля
$this->setDurationTime(new \DateTime(date("c", $this->getDuration()), new \DateTimeZone('UTC')));
return $this;
}
var baseurl = '{{ asset('') }}';
var lifesite = '{{ app.request.getBaseUrl }}';
@sergeylunev
Copy link
Author

Realy bad practice – use zoo of various technologies in parts of same project:

  • Twig and HAML
  • Plain css and SASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment