Split before interface name in RequireClause only if the interface has internal splits
commit9ec734d42c29ecebc92949c323080cc7b8018745
authorJake Bailey <jakebailey@fb.com>
Tue, 3 Apr 2018 18:57:50 +0000 (3 11:57 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Tue, 3 Apr 2018 19:01:57 +0000 (3 12:01 -0700)
treee429e026bd832b2240cb0abf9c00d19a4630a04e
parent2691c3f1f85c7bcede8148f4ae6fe22d6e98e89a
Split before interface name in RequireClause only if the interface has internal splits

Summary:
It looks inconsistent when we break before a long interface name in a list of `RequireClause`s:

```
require implements ShortNameWithNoSplits;
require implements
  LongNameWithNoSplits________________________________________;
require implements AnotherShortName;
require implements AFinalShortName;
```

After this change we avoid breaking between `require implements` and the interface name when the interface contains no splits (e.g., around generic parameters). This makes lists of `require implements` clauses (without internal splits) look more consistent.

Reviewed By: pittsw

Differential Revision: D7477201

fbshipit-source-id: b0c5c9acb136ce666b820e3118a95c51f16219a7
hphp/hack/src/hackfmt/doc.ml
hphp/hack/src/hackfmt/hack_format.ml
hphp/hack/test/hackfmt/tests/require_implements.php.exp