eclipse-pdt / pdt

PHP Development Tools project (PDT)
https://eclipse.org/pdt
Eclipse Public License 2.0
189 stars 46 forks source link

chained calls newlines comments formatter issue #100

Open divinity76 opened 3 years ago

divinity76 commented 3 years ago

Describe the bug formatter bugs out on certain chained calls with newlines and comments

Describe the eclipse environment Eclipse Version: 2020-12 (4.18.0) Build id: 20201210-1552 Eclipse IDE for PHP Developers 4.18.0.20201210-1200 epp.package.php Eclipse Packaging Project PHP Development Tools (PDT) 7.2.0.202005271851 org.eclipse.php.feature.group Eclipse PDT

Describe your system

To Reproduce try to format the code

<?php

Browsershot::url($url)->noSandbox()
->windowSize(1500, $height)
->clip(0, 0, 1500, $height)
->setScreenshotType('png', 100)
->timeout(10)
->delay(3)
// ->waitUntilNetworkIdle()
->save($image_filepath);

Expected behavior something that looks nice-ish?

actual result

<?php
Browsershot::url($url)->noSandbox()
    ->windowSize(1500, $height)
    ->clip(0, 0, 1500, $height)
    ->setScreenshotType('png', 100)
    ->timeout(10)
    ->delay(3)
    ->
// ->waitUntilNetworkIdle()
save($image_filepath);

that does not look very nice..

Screenshots image

Additional context Add any other context about the problem here.

zulus commented 3 years ago

I remember that @tbl0605 or someone from old Zend team tryied to fix that. Unfortunately in current state it's hard.