Skip to content

Commit

Permalink
Do not use syntax that confuses me
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 3, 2019
1 parent 8e20717 commit e77498e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Framework/MockObject/MockBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final class MockBuilder
private $type;

/**
* @var string[]
* @var null|string[]
*/
private $methods = [];

Expand Down Expand Up @@ -207,7 +207,7 @@ public function setMethods(array $methods = null): self
*/
public function onlyMethods(array $methods): self
{
if (!$methods) {
if (empty($methods)) {
$this->methods = null;

return $this;
Expand Down Expand Up @@ -260,7 +260,7 @@ public function onlyMethods(array $methods): self
*/
public function addMethods(array $methods): self
{
if (!$methods) {
if (empty($methods)) {
$this->methods = null;

return $this;
Expand Down

0 comments on commit e77498e

Please sign in to comment.