Skip to content

Commit d010a85

Browse files
committed
Formatters: add missing docblocks
1 parent 9ac7f79 commit d010a85

File tree

6 files changed

+43
-1
lines changed

6 files changed

+43
-1
lines changed

src/Formatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ abstract class Formatter
5454
*/
5555
public $assignSeparator;
5656

57+
abstract function __construct();
58+
5759
/**
5860
* Return indentation (whitespace)
5961
*

src/Formatter/Compact.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
class Compact extends Formatter
2323
{
24+
/**
25+
* {@inheritdoc}
26+
*/
2427
public function __construct()
2528
{
2629
$this->indentLevel = 0;
@@ -32,6 +35,9 @@ public function __construct()
3235
$this->assignSeparator = ':';
3336
}
3437

38+
/**
39+
* {@inheritdoc}
40+
*/
3541
public function indentStr($n = 0)
3642
{
3743
return ' ';

src/Formatter/Compressed.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
class Compressed extends Formatter
2323
{
24+
/**
25+
* {@inheritdoc}
26+
*/
2427
public function __construct()
2528
{
2629
$this->indentLevel = 0;
@@ -32,11 +35,17 @@ public function __construct()
3235
$this->assignSeparator = ':';
3336
}
3437

38+
/**
39+
* {@inheritdoc}
40+
*/
3541
public function indentStr($n = 0)
3642
{
3743
return '';
3844
}
3945

46+
/**
47+
* {@inheritdoc}
48+
*/
4049
public function blockLines($inner, $block)
4150
{
4251
$glue = $this->break . $inner;

src/Formatter/Crunched.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
class Crunched extends Formatter
2323
{
24+
/**
25+
* {@inheritdoc}
26+
*/
2427
public function __construct()
2528
{
2629
$this->indentLevel = 0;
@@ -32,11 +35,17 @@ public function __construct()
3235
$this->assignSeparator = ':';
3336
}
3437

38+
/**
39+
* {@inheritdoc}
40+
*/
3541
public function indentStr($n = 0)
3642
{
3743
return '';
3844
}
3945

46+
/**
47+
* {@inheritdoc}
48+
*/
4049
public function blockLines($inner, $block)
4150
{
4251
$glue = $this->break . $inner;

src/Formatter/Expanded.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
class Expanded extends Formatter
2323
{
24+
/**
25+
* {@inheritdoc}
26+
*/
2427
public function __construct()
2528
{
2629
$this->indentLevel = 0;

src/Formatter/Nested.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
*/
2222
class Nested extends Formatter
2323
{
24+
/**
25+
* {@inheritdoc}
26+
*/
2427
public function __construct()
2528
{
2629
$this->indentLevel = 0;
@@ -32,7 +35,11 @@ public function __construct()
3235
$this->assignSeparator = ': ';
3336
}
3437

35-
// adjust the depths of all children, depth first
38+
/**
39+
* Adjust the depths of all children, depth first
40+
*
41+
* @param \stdClass $block
42+
*/
3643
public function adjustAllChildren($block)
3744
{
3845
// flatten empty nested blocks
@@ -70,6 +77,9 @@ public function adjustAllChildren($block)
7077
}
7178
}
7279

80+
/**
81+
* {@inheritdoc}
82+
*/
7383
protected function blockLines($inner, $block)
7484
{
7585
$glue = $this->break . $inner;
@@ -87,6 +97,9 @@ protected function blockLines($inner, $block)
8797
}
8898
}
8999

100+
/**
101+
* {@inheritdoc}
102+
*/
90103
protected function block($block)
91104
{
92105
if ($block->type == 'root') {

0 commit comments

Comments
 (0)