Zend Studio formatter uses wrong format

2019-07-08 20:28发布

问题:

I am using ibuildings ZF. When I press Ctr+Shift+F the code is formated this way

$adapter = $this->getAuthAdapter(
$form->getValues());
$auth = Zend_Auth::getInstance();
$result = $auth->authenticate($adapter);
if (! $result->isValid()) {
    $form->setDescription(
    'Invalid credentials provided');
    $this->view->form = $form;
    return $this->render('index');
}

but I want to be formatted that way

$adapter = $this->getAuthAdapter($form->getValues());
$auth = Zend_Auth::getInstance();
$result = $auth->authenticate($adapter);
if (! $result->isValid()) {
    $form->setDescription('Invalid input');
    $this->view->form = $form;
    return $this->render('index');
}

how to configure this?

回答1:

The formatter can be configured in Window > Preferences > PHP > Code Style > Formatter > Edit... > Line Wrapping .

All the Settings are choose 'Do not wrap'.