Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Separate code into blocks.public function Your code sucks, let's fix it - DPC UnCon

53,721 views

Published on

Separate code into blocks.public function createPost($request){ Its like using $entity = new Post(); $repository = $this->getRepository(MyBundle:Post); Paragraphs. $form = new MyForm($entity); $form->bind($request); removed intermediates if ( ! $form->isValid()){ return array(form => $form, error => Invalid fields); } early return if ($repository->exists($entity)){ return array(form => $form, error => Duplicate post title); } $repository->save($entity); return $this->redirect(create_ok);}

Published in: Technology
  • Download Movie copy and paste Link▬►►► https://t.co/0Q7a9OBTfE
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Nice !! Download 100 % Free Ebooks, PPts, Study Notes, Novels, etc @ https://www.ThesisScientist.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If Rebecca Black was a developer... LOL
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Test
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

×