Skip to content

Commit c5300bd

Browse files
committed
Add missing parameter
1 parent 74ae404 commit c5300bd

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/SystemCtl.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @method array getTimers(?string $unitPrefix = null)
2020
*
2121
* @package SystemCtl
22-
* @author icanhazstring <[email protected]>
22+
* @author icanhazstring frömer <[email protected]>
2323
*/
2424
class SystemCtl
2525
{
@@ -124,8 +124,6 @@ public function __call($name, $arguments)
124124
throw new UnitTypeNotSupportedException("Unit {$unitName} not supported");
125125
}
126126

127-
// Singular differs requested name?
128-
// Get a list of units
129127
if ($isPlural) {
130128
return $this->getUnits(ucfirst($unitName), $arguments);
131129
}

src/Unit/AbstractUnit.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,26 +87,26 @@ public function start(bool $raise = true): bool
8787

8888
public function stop(bool $raise = true): bool
8989
{
90-
return $this->execute(__FUNCTION__);
90+
return $this->execute(__FUNCTION__, $raise);
9191
}
9292

9393
public function disable(bool $raise = true): bool
9494
{
95-
return $this->execute(__FUNCTION__);
95+
return $this->execute(__FUNCTION__, $raise);
9696
}
9797

9898
public function reload(bool $raise = true): bool
9999
{
100-
return $this->execute(__FUNCTION__);
100+
return $this->execute(__FUNCTION__, $raise);
101101
}
102102

103103
public function restart(bool $raise = true): bool
104104
{
105-
return $this->execute(__FUNCTION__);
105+
return $this->execute(__FUNCTION__, $raise);
106106
}
107107

108108
public function enable(bool $raise = true): bool
109109
{
110-
return $this->execute(__FUNCTION__);
110+
return $this->execute(__FUNCTION__, $raise);
111111
}
112112
}

tests/Unit/UnitTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public function testProcessShouldReturnExitCode()
108108
{
109109
$systemctl = $this->getSystemCtlMock(false);
110110
$service = $systemctl->getService('AwesomeService');
111+
111112
$this->assertFalse($service->start(false));
113+
$this->assertFalse($service->stop(false));
114+
$this->assertFalse($service->disable(false));
115+
$this->assertFalse($service->enable(false));
116+
$this->assertFalse($service->restart(false));
117+
$this->assertFalse($service->reload(false));
112118
}
113119
}

0 commit comments

Comments
 (0)