Skip to content

Instantly share code, notes, and snippets.

@sveggiani
Last active August 29, 2015 14:10
Show Gist options
  • Save sveggiani/ec8bcf0ee77f9cf3201b to your computer and use it in GitHub Desktop.
Save sveggiani/ec8bcf0ee77f9cf3201b to your computer and use it in GitHub Desktop.
Long lines breaking #php
<?php
// Manejable...
$flavors1 = array('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee', 'mocha chip');
if ($condition == 1) {
$flavors1 = array('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee', 'mocha chip');
if ($condition == 2) {
$flavors1 = array('chocolate', 'strawberry', 'vanilla', 'cookie dough',
'chocolate chip', 'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee', 'mocha chip');
}
}
// No tan manejable...
App::uses('AppController', 'Controller');
class PeopleController extends AppController {
public function index() {
if ($this->request->is('post')) {
if ($condition1 == true) {
$flavors1 = array('chocolate', 'strawberry', 'vanilla',
'cookie dough', 'chocolate chip',
'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee',
'mocha chip');
if ($condition2 == true) {
$flavors1 = array('chocolate', 'strawberry', 'vanilla',
'cookie dough', 'chocolate chip',
'mint chocolate chip', 'rocky road',
'peach', 'fudge brownie', 'coffee',
'mocha chip');
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment