Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
// If I copy and paste this unindented code...
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) {
$redirect = function () use ($app, $request) {
// TODO: Use URL Generator?
return $app->redirect($request->getBasePath() . '/admin/brands');
};
});
// It pastes as this... which is more or less exactly how it ends
// up looking if I just type it in and hit enter naturally...
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) {
$redirect = function () use ($app, $request) {
// TODO: Use URL Generator?
return $app->redirect($request->getBasePath() . '/admin/brands');
};
});
// What I expected is this...
$app->post('/admin/brands/{brandId}/unarchive', function (Application $app, Request $request, $brandId) {
$redirect = function () use ($app, $request) {
// TODO: Use URL Generator?
return $app->redirect($request->getBasePath() . '/admin/brands');
};
});
@acelaya

This comment has been minimized.

Copy link

acelaya commented Jul 29, 2014

I had the same problem and I think I just found the configuration option to fix this.
Go to File -> settings and then select Code style -> PHP -> Tabs and Indents and set the Continuation indent to 0.
That has fixed the problem for me without breaking any other indentation (I'm still testing, but looks good by the moment).

@simensen

This comment has been minimized.

Copy link
Owner Author

simensen commented Jul 29, 2014

@acelaya Thanks for the tip! I'll try this configuration for awhile. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.