Skip to content

Commit

Permalink
Merge pull request #40 from cjsaylor/sync-builder-interface
Browse files Browse the repository at this point in the history
Require addValue and defaultValue in builder interface.
  • Loading branch information
jrbasso committed Oct 9, 2017
2 parents eef2b3c + 08c3db9 commit 19db897
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/BuilderInterface.php
Expand Up @@ -29,6 +29,29 @@ public function addBehavior($slug, $strategy, array $args = []);
*/
public function defaultBehavior($strategy, array $args = []);

/**
* Add a value to be returned when the builder is executed.
*
* Value will only be returned if it is enabled for the user's bucket.
*
* @param string $slug
* @param mixed $value
*
* @return \Zumba\Swivel\BuilderInterface
*/
public function addValue($slug, $value);

/**
* Add a default value.
*
* Will be used if all other behaviors and values are not enabled for the user's bucket.
*
* @param mixed $value
*
* @return \Zumba\Swivel\BuilderInterface
*/
public function defaultValue($value);

/**
* Creates a new Behavior object with an attached strategy.
*
Expand Down

0 comments on commit 19db897

Please sign in to comment.