Skip to content

Commit

Permalink
Extract write related methods from ValueContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
ilijastuden committed Dec 15, 2016
1 parent 6c605e5 commit 4882519
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/ValueContainer/ValueContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* @package ActiveCollab\ValueContainer
*/
class ValueContainer implements ValueContainerInterface
class ValueContainer implements ValueContainerInterface, WriteableValueContainerInterface
{
/**
* @var bool
Expand Down
11 changes: 0 additions & 11 deletions src/ValueContainer/ValueContainerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,4 @@ public function hasValue();
* @return mixed
*/
public function getValue();

/**
* @param mixed $value
* @return $this
*/
public function &setValue($value);

/**
* @return $this
*/
public function &removeValue();
}
26 changes: 26 additions & 0 deletions src/ValueContainer/WriteableValueContainerInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

/*
* This file is part of the Active Collab Utils project.
*
* (c) A51 doo <info@activecollab.com>. All rights reserved.
*/

namespace ActiveCollab\ValueContainer;

/**
* @package ActiveCollab\ValueContainer
*/
interface WriteableValueContainerInterface
{
/**
* @param mixed $value
* @return $this
*/
public function &setValue($value);

/**
* @return $this
*/
public function &removeValue();
}

0 comments on commit 4882519

Please sign in to comment.