Skip to content

Commit 0e0db2b

Browse files
committed
Code cleanup for updated fixer
1 parent 4abbc9b commit 0e0db2b

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

src/PHPFUI/InstaDoc/Controller.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public function display(array $classPagesToShow = Controller::VALID_CLASS_PAGES,
133133
elseif ($this->getParameter(Controller::CLASS_NAME))
134134
{
135135
$nameSpace = $this->getParameter(Controller::NAMESPACE);
136+
136137
if ($nameSpace)
137138
{
138139
$nameSpace .= '\\';

src/PHPFUI/InstaDoc/Section/Doc.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ protected function getConstant(\ReflectionClassConstant $constant, string $name,
268268
* @todo get attributes everywhere
269269
* $attributes = $this->getAttributes($constant);
270270
*/
271-
272271
$docBlock = $this->getDocBlock($constant);
273272
$info = $this->getAccess($constant) . ' ' . $this->getColor('constant', $this->getColor('constant', $this->getName($constant, $name, true))) . ' = ' . $this->getValueString($value);
274273
$info .= $this->getComments($docBlock);
@@ -298,7 +297,6 @@ protected function getContent(string $accessType) : \PHPFUI\Table
298297
* @todo get attributes everywhere
299298
* $attributes = $this->getAttributes($constant);
300299
*/
301-
302300
if ($constant->{$accessType}())
303301
{
304302
if ($section)

src/PHPFUI/InstaDoc/Section/Functions.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ private function documentFunction(string $function) : \PHPFUI\Container
8787
* @todo get attributes everywhere
8888
* $attributes = $this->getAttributes($this->reflection);
8989
*/
90-
9190
$gridX = null;
9291

9392
foreach ($properties as $type)

src/PHPFUI/InstaDoc/Tests/Test80.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ final public function public_function_returning_and_taking_array(array | bool $a
3232
return [];
3333
}
3434

35+
#[\ReturnTypeWillChange]
36+
public function count()
37+
{
38+
return 0;
39+
}
40+
3541
/**
3642
* This function does nothing. But it has a very long
3743
* meaningless description that just seems to go on and on and
@@ -90,10 +96,4 @@ private function UpperCaseMethodName() : mixed { return null; }
9096
* Testing method sorting
9197
*/
9298
private function upperTest() : void {}
93-
94-
#[\ReturnTypeWillChange]
95-
public function count()
96-
{
97-
return 0;
98-
}
9999
}

src/PHPFUI/InstaDoc/Tests/Test80B.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212
#[Test80]
1313
#[\PHPFUI\InstaDoc\Tests\Test80]
14-
#[\PHPFUI\InstaDoc\Tests\Test80(1234), \PHPFUI\InstaDoc\Tests\Test80(value: 1234), \PHPFUI\InstaDoc\Tests\Test80(array("key" => "value"))]
14+
#[\PHPFUI\InstaDoc\Tests\Test80(1234), \PHPFUI\InstaDoc\Tests\Test80(value: 1234), \PHPFUI\InstaDoc\Tests\Test80(['key' => 'value'])]
1515
#[\PHPFUI\InstaDoc\Tests\Test80(\PHPFUI\InstaDoc\Tests\Test80::CONST_PUBLIC_STRING)]
1616
#[\PHPFUI\InstaDoc\Tests\Test80(100 + 200)]
1717
#[Property(type: 'function', name: 'Hello')]
@@ -28,5 +28,4 @@ protected function protected_function_no_return(?string $fred, $unknown = 3.14)
2828
* {@inheritDoc}
2929
*/
3030
private function private_function_no_return(string | Test80 | null $fred = 'Eythel') : void {}
31-
3231
}

tests/SectionTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function setUp() : void
3434
{
3535
$path = \str_replace('/', '\\', \str_replace('.php', '', $filename));
3636
$parts = \explode('\\', $path);
37+
3738
while (\count($parts) && 'src' != \array_shift($parts))
3839
{
3940
// leave part on floor, not needed
@@ -108,6 +109,7 @@ public function testInvalidPage() : void
108109
public function testTestClass() : void
109110
{
110111
$runningPHPVersion = PHP_MAJOR_VERSION * 10 + PHP_MINOR_VERSION;
112+
111113
foreach ([80, 74, 73, 72, 71] as $phpVersion)
112114
{
113115
if ($runningPHPVersion >= $phpVersion)

tests/SyntaxTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22

33
class SyntaxTest extends \PHPFUI\PHPUnitSyntaxCoverage\Extensions
44
{
5-
65
public function testDirectory() : void
76
{
8-
$this->addSkipDirectory(str_replace('/', DIRECTORY_SEPARATOR, 'PHPFUI/InstaDoc/Tests'));
7+
$this->addSkipDirectory(\str_replace('/', DIRECTORY_SEPARATOR, 'PHPFUI/InstaDoc/Tests'));
98
$this->assertValidPHPDirectory(__DIR__ . '/../src', 'src directory has an error');
109
}
1110

1211
public function testValidPHPFile() : void
1312
{
1413
$this->assertValidPHPFile(__DIR__ . '/../install.php', 'install file is bad');
1514
}
16-
1715
}

tests/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
error_reporting(E_ALL);
3+
\error_reporting(E_ALL);
44

55
include __DIR__ . '//..//vendor//autoload.php';

0 commit comments

Comments
 (0)