Skip to content

chore: remove the em dashes from src and tests - #215

Merged
lsnepomuceno merged 1 commit into
mainfrom
chore/em-dashes-src-tests
Aug 9, 2026
Merged

chore: remove the em dashes from src and tests#215
lsnepomuceno merged 1 commit into
mainfrom
chore/em-dashes-src-tests

Conversation

@lsnepomuceno

Copy link
Copy Markdown
Owner

First pass of the convention added in #214.

49 occurrences across 31 files. Every change is inside a comment, a docblock, or one of two user-facing strings. No behaviour changes, and the diff is 49 insertions against 49 deletions.

Not a mechanical substitution

The right replacement depends on what the dash was doing:

Dash was doing Replacement Example
introducing an explanation colon never exposed it: openssl_pkcs12_read() hands back an already-decrypted key
adding a detail comma the key's password, empty when it is unencrypted
starting a new thought full stop and always failed. See docs/history/…
fencing an aside that already had commas parentheses The order (certificate, private key, then the CA chain) matches what …

That last case is why a sed would not have worked. NativeCertificateReader had The order — certificate, private key, then the CA chain — matches, where turning the pair into commas produces four commas in a row and loses the grouping.

Two that are not prose

Both are text a user reads, so the rule applies, and neither is asserted by any test. I checked before touching them.

  • pdf:validate-signature printed 1. Name — valid, covers the whole file, now prints 1. Name: valid, covers the whole file.
  • InvalidPemContentException said found binary DER or PKCS#12 bytes — read those through certificate() instead, now ends the sentence: … bytes. Read those through certificate() instead.

Remaining

docs/ and the root files still hold 234, left for the next pass so this diff stays reviewable and does not mix documentation prose with 45 docblocks.

composer check on PHP 8.5 through .docker: green, 135 tests.

First pass of the convention added in #214. 49 occurrences across 31 files,
none of them a mechanical substitution: the replacement is a colon where what
follows explains, a comma where it merely adds, a full stop where it starts a
new thought, and parentheses where a pair of dashes was fencing an aside that
already contained commas.

Two are not prose and were changed anyway, since both are text a user reads.
pdf:validate-signature printed "1. Name — valid, covers the whole file" and
now prints "1. Name: valid, ...". InvalidPemContentException said "found
binary DER or PKCS#12 bytes — read those through certificate()" and now ends
the sentence instead. No test asserts either string, checked before touching
them.

Behaviour is otherwise untouched: 49 insertions, 49 deletions, every one of
them inside a comment, a docblock or one of those two strings.

docs/ and the root files still hold 234 and are left for the next pass.
@lsnepomuceno
lsnepomuceno merged commit dff3725 into main Aug 9, 2026
3 checks passed
@lsnepomuceno lsnepomuceno self-assigned this Aug 9, 2026
@lsnepomuceno lsnepomuceno added the php Pull requests that update php code label Aug 9, 2026
pull Bot pushed a commit to KornaLaravel/laravel-a1-pdf-sign that referenced this pull request Aug 9, 2026
Second pass of the convention added in lsnepomuceno#214. 159 occurrences across 13 files,
130 lines changed, insertions matching deletions exactly, so nothing was lost
or added beyond the punctuation.

Three shapes recurred and were treated as shapes rather than one at a time:

The seven decision records titled "# 000N — Title" now use a colon. The index
links them by filename, so nothing else moved.

The twenty roadmap rows in the modernisation record all read "**done** — …"
and now read "**done**: …". Their Risk column held a bare "—" meaning none,
which is a typographic placeholder rather than punctuation; it reads "n/a".

One sentence in the quality policy was split by a fenced code block, opening
with "It dies before scoring anything —" and resuming after the block with
"— and reproduces with and without --parallel". A dash cannot span a code
fence and stay readable, so it is now a colon before and a fresh sentence
after.

Everything else was decided per sentence, as in lsnepomuceno#215.

The root files still hold 73 and are the last pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant