• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MyIntervals / PHP-CSS-Parser / 13344406227

15 Feb 2025 11:00AM UTC coverage: 50.498% (+0.08%) from 50.421%
13344406227

push

github

web-flow
[TASK] Use type-safe setters in `OutputFormat` factory methods (#930)

Also add one more test for good measure.

12 of 12 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

963 of 1907 relevant lines covered (50.5%)

11.55 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.49
/src/OutputFormat.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Sabberworm\CSS;
6

7
class OutputFormat
8
{
9
    /**
10
     * Value format: `"` means double-quote, `'` means single-quote
11
     *
12
     * @var string
13
     *
14
     * @internal since 8.8.0, will be made private in 9.0.0
15
     */
16
    public $sStringQuotingType = '"';
17

18
    /**
19
     * Output RGB colors in hash notation if possible
20
     *
21
     * @var bool
22
     *
23
     * @internal since 8.8.0, will be made private in 9.0.0
24
     */
25
    public $bRGBHashNotation = true;
26

27
    /**
28
     * Declaration format
29
     *
30
     * Semicolon after the last rule of a declaration block can be omitted. To do that, set this false.
31
     *
32
     * @var bool
33
     *
34
     * @internal since 8.8.0, will be made private in 9.0.0
35
     */
36
    public $bSemicolonAfterLastRule = true;
37

38
    /**
39
     * Spacing
40
     * Note that these strings are not sanity-checked: the value should only consist of whitespace
41
     * Any newline character will be indented according to the current level.
42
     * The triples (After, Before, Between) can be set using a wildcard (e.g. `$oFormat->set('Space*Rules', "\n");`)
43
     *
44
     * @var string
45
     *
46
     * @internal since 8.8.0, will be made private in 9.0.0
47
     */
48
    public $sSpaceAfterRuleName = ' ';
49

50
    /**
51
     * @var string
52
     *
53
     * @internal since 8.8.0, will be made private in 9.0.0
54
     */
55
    public $sSpaceBeforeRules = '';
56

57
    /**
58
     * @var string
59
     *
60
     * @internal since 8.8.0, will be made private in 9.0.0
61
     */
62
    public $sSpaceAfterRules = '';
63

64
    /**
65
     * @var string
66
     *
67
     * @internal since 8.8.0, will be made private in 9.0.0
68
     */
69
    public $sSpaceBetweenRules = '';
70

71
    /**
72
     * @var string
73
     *
74
     * @internal since 8.8.0, will be made private in 9.0.0
75
     */
76
    public $sSpaceBeforeBlocks = '';
77

78
    /**
79
     * @var string
80
     *
81
     * @internal since 8.8.0, will be made private in 9.0.0
82
     */
83
    public $sSpaceAfterBlocks = '';
84

85
    /**
86
     * @var string
87
     *
88
     * @internal since 8.8.0, will be made private in 9.0.0
89
     */
90
    public $sSpaceBetweenBlocks = "\n";
91

92
    /**
93
     * Content injected in and around at-rule blocks.
94
     *
95
     * @var string
96
     *
97
     * @internal since 8.8.0, will be made private in 9.0.0
98
     */
99
    public $sBeforeAtRuleBlock = '';
100

101
    /**
102
     * @var string
103
     *
104
     * @internal since 8.8.0, will be made private in 9.0.0
105
     */
106
    public $sAfterAtRuleBlock = '';
107

108
    /**
109
     * This is what’s printed before and after the comma if a declaration block contains multiple selectors.
110
     *
111
     * @var string
112
     *
113
     * @internal since 8.8.0, will be made private in 9.0.0
114
     */
115
    public $sSpaceBeforeSelectorSeparator = '';
116

117
    /**
118
     * @var string
119
     *
120
     * @internal since 8.8.0, will be made private in 9.0.0
121
     */
122
    public $sSpaceAfterSelectorSeparator = ' ';
123

124
    /**
125
     * This is what’s inserted before the separator in value lists, by default.
126
     *
127
     * @var string
128
     *
129
     * @internal since 8.8.0, will be made private in 9.0.0
130
     */
131
    public $sSpaceBeforeListArgumentSeparator = '';
132

133
    /**
134
     * Keys are separators (e.g. `,`).  Values are the space sequence to insert, or an empty string.
135
     *
136
     * @var array<non-empty-string, string>
137
     *
138
     * @internal since 8.8.0, will be made private in 9.0.0
139
     */
140
    public $aSpaceBeforeListArgumentSeparators = [];
141

142
    /**
143
     * This is what’s inserted after the separator in value lists, by default.
144
     *
145
     * @var string
146
     *
147
     * @internal since 8.8.0, will be made private in 9.0.0
148
     */
149
    public $sSpaceAfterListArgumentSeparator = '';
150

151
    /**
152
     * Keys are separators (e.g. `,`).  Values are the space sequence to insert, or an empty string.
153
     *
154
     * @var array<non-empty-string, string>
155
     *
156
     * @internal since 8.8.0, will be made private in 9.0.0
157
     */
158
    public $aSpaceAfterListArgumentSeparators = [];
159

160
    /**
161
     * @var string
162
     *
163
     * @internal since 8.8.0, will be made private in 9.0.0
164
     */
165
    public $sSpaceBeforeOpeningBrace = ' ';
166

167
    /**
168
     * Content injected in and around declaration blocks.
169
     *
170
     * @var string
171
     *
172
     * @internal since 8.8.0, will be made private in 9.0.0
173
     */
174
    public $sBeforeDeclarationBlock = '';
175

176
    /**
177
     * @var string
178
     *
179
     * @internal since 8.8.0, will be made private in 9.0.0
180
     */
181
    public $sAfterDeclarationBlockSelectors = '';
182

183
    /**
184
     * @var string
185
     *
186
     * @internal since 8.8.0, will be made private in 9.0.0
187
     */
188
    public $sAfterDeclarationBlock = '';
189

190
    /**
191
     * Indentation character(s) per level. Only applicable if newlines are used in any of the spacing settings.
192
     *
193
     * @var string
194
     *
195
     * @internal since 8.8.0, will be made private in 9.0.0
196
     */
197
    public $sIndentation = "\t";
198

199
    /**
200
     * Output exceptions.
201
     *
202
     * @var bool
203
     *
204
     * @internal since 8.8.0, will be made private in 9.0.0
205
     */
206
    public $bIgnoreExceptions = false;
207

208
    /**
209
     * Render comments for lists and RuleSets
210
     *
211
     * @var bool
212
     *
213
     * @internal since 8.8.0, will be made private in 9.0.0
214
     */
215
    public $bRenderComments = false;
216

217
    /**
218
     * @var OutputFormatter|null
219
     */
220
    private $oFormatter = null;
221

222
    /**
223
     * @var OutputFormat|null
224
     */
225
    private $oNextLevelFormat = null;
226

227
    /**
228
     * @var int
229
     */
230
    private $iIndentationLevel = 0;
231

232
    public function __construct() {}
233

234
    /**
235
     * @return string|int|bool|null
236
     */
237
    public function get(string $sName)
20✔
238
    {
239
        $aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
20✔
240
        foreach ($aVarPrefixes as $prefix) {
20✔
241
            $sFieldName = $prefix . \ucfirst($sName);
20✔
242
            if (isset($this->$sFieldName)) {
20✔
243
                return $this->$sFieldName;
20✔
244
            }
245
        }
246
        return null;
×
247
    }
248

249
    /**
250
     * @param array<array-key, string>|string $aNames
251
     * @param mixed $mValue
252
     *
253
     * @return self|false
254
     */
255
    public function set($aNames, $mValue)
4✔
256
    {
257
        $aVarPrefixes = ['a', 's', 'm', 'b', 'f', 'o', 'c', 'i'];
4✔
258
        if (\is_string($aNames) && \strpos($aNames, '*') !== false) {
4✔
259
            $aNames =
260
                [
261
                    \str_replace('*', 'Before', $aNames),
4✔
262
                    \str_replace('*', 'Between', $aNames),
4✔
263
                    \str_replace('*', 'After', $aNames),
4✔
264
                ];
UNCOV
265
        } elseif (!\is_array($aNames)) {
×
UNCOV
266
            $aNames = [$aNames];
×
267
        }
268
        foreach ($aVarPrefixes as $prefix) {
4✔
269
            $bDidReplace = false;
4✔
270
            foreach ($aNames as $sName) {
4✔
271
                $sFieldName = $prefix . \ucfirst($sName);
4✔
272
                if (isset($this->$sFieldName)) {
4✔
273
                    $this->$sFieldName = $mValue;
4✔
274
                    $bDidReplace = true;
4✔
275
                }
276
            }
277
            if ($bDidReplace) {
4✔
278
                return $this;
4✔
279
            }
280
        }
281
        // Break the chain so the user knows this option is invalid
282
        return false;
×
283
    }
284

285
    /**
286
     * @param array<array-key, mixed> $aArguments
287
     *
288
     * @return mixed
289
     *
290
     * @throws \Exception
291
     */
292
    public function __call(string $sMethodName, array $aArguments)
20✔
293
    {
294
        if (\method_exists(OutputFormatter::class, $sMethodName)) {
20✔
295
            return \call_user_func_array([$this->getFormatter(), $sMethodName], $aArguments);
20✔
296
        } else {
297
            throw new \Exception('Unknown OutputFormat method called: ' . $sMethodName);
×
298
        }
299
    }
300

301
    /**
302
     * @internal
303
     */
304
    public function getStringQuotingType(): string
21✔
305
    {
306
        return $this->sStringQuotingType;
21✔
307
    }
308

309
    /**
310
     * @return $this fluent interface
311
     */
312
    public function setStringQuotingType(string $quotingType): self
3✔
313
    {
314
        $this->sStringQuotingType = $quotingType;
3✔
315

316
        return $this;
3✔
317
    }
318

319
    /**
320
     * @internal
321
     */
322
    public function getRGBHashNotation(): bool
23✔
323
    {
324
        return $this->bRGBHashNotation;
23✔
325
    }
326

327
    /**
328
     * @return $this fluent interface
329
     */
330
    public function setRGBHashNotation(bool $rgbHashNotation): self
4✔
331
    {
332
        $this->bRGBHashNotation = $rgbHashNotation;
4✔
333

334
        return $this;
4✔
335
    }
336

337
    /**
338
     * @internal
339
     */
340
    public function getSemicolonAfterLastRule(): bool
3✔
341
    {
342
        return $this->bSemicolonAfterLastRule;
3✔
343
    }
344

345
    /**
346
     * @return $this fluent interface
347
     */
348
    public function setSemicolonAfterLastRule(bool $semicolonAfterLastRule): self
4✔
349
    {
350
        $this->bSemicolonAfterLastRule = $semicolonAfterLastRule;
4✔
351

352
        return $this;
4✔
353
    }
354

355
    /**
356
     * @internal
357
     */
358
    public function getSpaceAfterRuleName(): string
5✔
359
    {
360
        return $this->sSpaceAfterRuleName;
5✔
361
    }
362

363
    /**
364
     * @return $this fluent interface
365
     */
366
    public function setSpaceAfterRuleName(string $whitespace): self
20✔
367
    {
368
        $this->sSpaceAfterRuleName = $whitespace;
20✔
369

370
        return $this;
20✔
371
    }
372

373
    /**
374
     * @internal
375
     */
376
    public function getSpaceBeforeRules(): string
4✔
377
    {
378
        return $this->sSpaceBeforeRules;
4✔
379
    }
380

381
    /**
382
     * @return $this fluent interface
383
     */
384
    public function setSpaceBeforeRules(string $whitespace): self
32✔
385
    {
386
        $this->sSpaceBeforeRules = $whitespace;
32✔
387

388
        return $this;
32✔
389
    }
390

391
    /**
392
     * @internal
393
     */
394
    public function getSpaceAfterRules(): string
4✔
395
    {
396
        return $this->sSpaceAfterRules;
4✔
397
    }
398

399
    /**
400
     * @return $this fluent interface
401
     */
402
    public function setSpaceAfterRules(string $whitespace): self
32✔
403
    {
404
        $this->sSpaceAfterRules = $whitespace;
32✔
405

406
        return $this;
32✔
407
    }
408

409
    /**
410
     * @internal
411
     */
412
    public function getSpaceBetweenRules(): string
4✔
413
    {
414
        return $this->sSpaceBetweenRules;
4✔
415
    }
416

417
    /**
418
     * @return $this fluent interface
419
     */
420
    public function setSpaceBetweenRules(string $whitespace): self
32✔
421
    {
422
        $this->sSpaceBetweenRules = $whitespace;
32✔
423

424
        return $this;
32✔
425
    }
426

427
    /**
428
     * @internal
429
     */
430
    public function getSpaceBeforeBlocks(): string
4✔
431
    {
432
        return $this->sSpaceBeforeBlocks;
4✔
433
    }
434

435
    /**
436
     * @return $this fluent interface
437
     */
438
    public function setSpaceBeforeBlocks(string $whitespace): self
32✔
439
    {
440
        $this->sSpaceBeforeBlocks = $whitespace;
32✔
441

442
        return $this;
32✔
443
    }
444

445
    /**
446
     * @internal
447
     */
448
    public function getSpaceAfterBlocks(): string
4✔
449
    {
450
        return $this->sSpaceAfterBlocks;
4✔
451
    }
452

453
    /**
454
     * @return $this fluent interface
455
     */
456
    public function setSpaceAfterBlocks(string $whitespace): self
32✔
457
    {
458
        $this->sSpaceAfterBlocks = $whitespace;
32✔
459

460
        return $this;
32✔
461
    }
462

463
    /**
464
     * @internal
465
     */
466
    public function getSpaceBetweenBlocks(): string
4✔
467
    {
468
        return $this->sSpaceBetweenBlocks;
4✔
469
    }
470

471
    /**
472
     * @return $this fluent interface
473
     */
474
    public function setSpaceBetweenBlocks(string $whitespace): self
33✔
475
    {
476
        $this->sSpaceBetweenBlocks = $whitespace;
33✔
477

478
        return $this;
33✔
479
    }
480

481
    /**
482
     * @internal
483
     */
484
    public function getBeforeAtRuleBlock(): string
2✔
485
    {
486
        return $this->sBeforeAtRuleBlock;
2✔
487
    }
488

489
    /**
490
     * @return $this fluent interface
491
     */
492
    public function setBeforeAtRuleBlock(string $content): self
2✔
493
    {
494
        $this->sBeforeAtRuleBlock = $content;
2✔
495

496
        return $this;
2✔
497
    }
498

499
    /**
500
     * @internal
501
     */
502
    public function getAfterAtRuleBlock(): string
2✔
503
    {
504
        return $this->sAfterAtRuleBlock;
2✔
505
    }
506

507
    /**
508
     * @return $this fluent interface
509
     */
510
    public function setAfterAtRuleBlock(string $content): self
2✔
511
    {
512
        $this->sAfterAtRuleBlock = $content;
2✔
513

514
        return $this;
2✔
515
    }
516

517
    /**
518
     * @internal
519
     */
520
    public function getSpaceBeforeSelectorSeparator(): string
2✔
521
    {
522
        return $this->sSpaceBeforeSelectorSeparator;
2✔
523
    }
524

525
    /**
526
     * @return $this fluent interface
527
     */
528
    public function setSpaceBeforeSelectorSeparator(string $whitespace): self
2✔
529
    {
530
        $this->sSpaceBeforeSelectorSeparator = $whitespace;
2✔
531

532
        return $this;
2✔
533
    }
534

535
    /**
536
     * @internal
537
     */
538
    public function getSpaceAfterSelectorSeparator(): string
4✔
539
    {
540
        return $this->sSpaceAfterSelectorSeparator;
4✔
541
    }
542

543
    /**
544
     * @return $this fluent interface
545
     */
546
    public function setSpaceAfterSelectorSeparator(string $whitespace): self
19✔
547
    {
548
        $this->sSpaceAfterSelectorSeparator = $whitespace;
19✔
549

550
        return $this;
19✔
551
    }
552

553
    /**
554
     * @internal
555
     */
556
    public function getSpaceBeforeListArgumentSeparator(): string
2✔
557
    {
558
        return $this->sSpaceBeforeListArgumentSeparator;
2✔
559
    }
560

561
    /**
562
     * @return $this fluent interface
563
     */
564
    public function setSpaceBeforeListArgumentSeparator(string $whitespace): self
2✔
565
    {
566
        $this->sSpaceBeforeListArgumentSeparator = $whitespace;
2✔
567

568
        return $this;
2✔
569
    }
570

571
    /**
572
     * @return array<non-empty-string, string>
573
     *
574
     * @internal
575
     */
576
    public function getSpaceBeforeListArgumentSeparators(): array
20✔
577
    {
578
        return $this->aSpaceBeforeListArgumentSeparators;
20✔
579
    }
580

581
    /**
582
     * @param array<non-empty-string, string> $separatorSpaces
583
     *
584
     * @return $this fluent interface
585
     */
586
    public function setSpaceBeforeListArgumentSeparators(array $separatorSpaces): self
2✔
587
    {
588
        $this->aSpaceBeforeListArgumentSeparators = $separatorSpaces;
2✔
589

590
        return $this;
2✔
591
    }
592

593
    /**
594
     * @internal
595
     */
596
    public function getSpaceAfterListArgumentSeparator(): string
2✔
597
    {
598
        return $this->sSpaceAfterListArgumentSeparator;
2✔
599
    }
600

601
    /**
602
     * @return $this fluent interface
603
     */
604
    public function setSpaceAfterListArgumentSeparator(string $whitespace): self
4✔
605
    {
606
        $this->sSpaceAfterListArgumentSeparator = $whitespace;
4✔
607

608
        return $this;
4✔
609
    }
610

611
    /**
612
     * @return array<non-empty-string, string>
613
     *
614
     * @internal
615
     */
616
    public function getSpaceAfterListArgumentSeparators(): array
22✔
617
    {
618
        return $this->aSpaceAfterListArgumentSeparators;
22✔
619
    }
620

621
    /**
622
     * @param array<non-empty-string, string> $separatorSpaces
623
     *
624
     * @return $this fluent interface
625
     */
626
    public function setSpaceAfterListArgumentSeparators(array $separatorSpaces): self
19✔
627
    {
628
        $this->aSpaceAfterListArgumentSeparators = $separatorSpaces;
19✔
629

630
        return $this;
19✔
631
    }
632

633
    /**
634
     * @internal
635
     */
636
    public function getSpaceBeforeOpeningBrace(): string
4✔
637
    {
638
        return $this->sSpaceBeforeOpeningBrace;
4✔
639
    }
640

641
    /**
642
     * @return $this fluent interface
643
     */
644
    public function setSpaceBeforeOpeningBrace(string $whitespace): self
19✔
645
    {
646
        $this->sSpaceBeforeOpeningBrace = $whitespace;
19✔
647

648
        return $this;
19✔
649
    }
650

651
    /**
652
     * @internal
653
     */
654
    public function getBeforeDeclarationBlock(): string
2✔
655
    {
656
        return $this->sBeforeDeclarationBlock;
2✔
657
    }
658

659
    /**
660
     * @return $this fluent interface
661
     */
662
    public function setBeforeDeclarationBlock(string $content): self
2✔
663
    {
664
        $this->sBeforeDeclarationBlock = $content;
2✔
665

666
        return $this;
2✔
667
    }
668

669
    /**
670
     * @internal
671
     */
672
    public function getAfterDeclarationBlockSelectors(): string
2✔
673
    {
674
        return $this->sAfterDeclarationBlockSelectors;
2✔
675
    }
676

677
    /**
678
     * @return $this fluent interface
679
     */
680
    public function setAfterDeclarationBlockSelectors(string $content): self
2✔
681
    {
682
        $this->sAfterDeclarationBlockSelectors = $content;
2✔
683

684
        return $this;
2✔
685
    }
686

687
    /**
688
     * @internal
689
     */
690
    public function getAfterDeclarationBlock(): string
2✔
691
    {
692
        return $this->sAfterDeclarationBlock;
2✔
693
    }
694

695
    /**
696
     * @return $this fluent interface
697
     */
698
    public function setAfterDeclarationBlock(string $content): self
2✔
699
    {
700
        $this->sAfterDeclarationBlock = $content;
2✔
701

702
        return $this;
2✔
703
    }
704

705
    /**
706
     * @internal
707
     */
708
    public function getIndentation(): string
13✔
709
    {
710
        return $this->sIndentation;
13✔
711
    }
712

713
    /**
714
     * @return $this fluent interface
715
     */
716
    public function setIndentation(string $indentation): self
16✔
717
    {
718
        $this->sIndentation = $indentation;
16✔
719

720
        return $this;
16✔
721
    }
722

723
    /**
724
     * @internal
725
     */
726
    public function getIgnoreExceptions(): bool
4✔
727
    {
728
        return $this->bIgnoreExceptions;
4✔
729
    }
730

731
    /**
732
     * @return $this fluent interface
733
     */
734
    public function setIgnoreExceptions(bool $ignoreExceptions): self
6✔
735
    {
736
        $this->bIgnoreExceptions = $ignoreExceptions;
6✔
737

738
        return $this;
6✔
739
    }
740

741
    /**
742
     * @internal
743
     */
744
    public function getRenderComments(): bool
5✔
745
    {
746
        return $this->bRenderComments;
5✔
747
    }
748

749
    /**
750
     * @return $this fluent interface
751
     */
752
    public function setRenderComments(bool $renderComments): self
33✔
753
    {
754
        $this->bRenderComments = $renderComments;
33✔
755

756
        return $this;
33✔
757
    }
758

759
    /**
760
     * @internal
761
     */
762
    public function getIndentationLevel(): int
22✔
763
    {
764
        return $this->iIndentationLevel;
22✔
765
    }
766

767
    /**
768
     * @return $this fluent interface
769
     */
770
    public function indentWithTabs(int $numberOfTabs = 1): self
6✔
771
    {
772
        return $this->setIndentation(\str_repeat("\t", $numberOfTabs));
6✔
773
    }
774

775
    /**
776
     * @return $this fluent interface
777
     */
778
    public function indentWithSpaces(int $numberOfSpaces = 2): self
7✔
779
    {
780
        return $this->setIndentation(\str_repeat(' ', $numberOfSpaces));
7✔
781
    }
782

783
    /**
784
     * @internal since V8.8.0
785
     */
786
    public function nextLevel(): self
25✔
787
    {
788
        if ($this->oNextLevelFormat === null) {
25✔
789
            $this->oNextLevelFormat = clone $this;
25✔
790
            $this->oNextLevelFormat->iIndentationLevel++;
25✔
791
            $this->oNextLevelFormat->oFormatter = null;
25✔
792
        }
793
        return $this->oNextLevelFormat;
25✔
794
    }
795

796
    public function beLenient(): void
1✔
797
    {
798
        $this->bIgnoreExceptions = true;
1✔
799
    }
1✔
800

801
    public function getFormatter(): OutputFormatter
23✔
802
    {
803
        if ($this->oFormatter === null) {
23✔
804
            $this->oFormatter = new OutputFormatter($this);
23✔
805
        }
806
        return $this->oFormatter;
23✔
807
    }
808

809
    /**
810
     * Creates an instance of this class without any particular formatting settings.
811
     */
812
    public static function create(): self
48✔
813
    {
814
        return new OutputFormat();
48✔
815
    }
816

817
    /**
818
     * Creates an instance of this class with a preset for compact formatting.
819
     */
820
    public static function createCompact(): self
16✔
821
    {
822
        $format = self::create();
16✔
823
        $format
824
            ->setSpaceBeforeRules('')
16✔
825
            ->setSpaceBetweenRules('')
16✔
826
            ->setSpaceAfterRules('')
16✔
827
            ->setSpaceBeforeBlocks('')
16✔
828
            ->setSpaceBetweenBlocks('')
16✔
829
            ->setSpaceAfterBlocks('')
16✔
830
            ->setSpaceAfterRuleName('')
16✔
831
            ->setSpaceBeforeOpeningBrace('')
16✔
832
            ->setSpaceAfterSelectorSeparator('')
16✔
833
            ->setRenderComments(false);
16✔
834

835
        return $format;
16✔
836
    }
837

838
    /**
839
     * Creates an instance of this class with a preset for pretty formatting.
840
     */
841
    public static function createPretty(): self
16✔
842
    {
843
        $format = self::create();
16✔
844
        $format
845
            ->setSpaceBeforeRules("\n")
16✔
846
            ->setSpaceBetweenRules("\n")
16✔
847
            ->setSpaceAfterRules("\n")
16✔
848
            ->setSpaceBeforeBlocks("\n")
16✔
849
            ->setSpaceBetweenBlocks("\n\n")
16✔
850
            ->setSpaceAfterBlocks("\n")
16✔
851
            ->setSpaceAfterListArgumentSeparators([',' => ' '])
16✔
852
            ->setRenderComments(true);
16✔
853

854
        return $format;
16✔
855
    }
856
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc