Skip to content

Commit

Permalink
Merge pull request #171 from clue-labs/revert-remove-attribute
Browse files Browse the repository at this point in the history
Revert "Merge pull request #138 from clue-labs/remove-attribute"
  • Loading branch information
clue authored Sep 29, 2019
2 parents 1eafe38 + 09ea558 commit b744a33
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 66 deletions.
7 changes: 0 additions & 7 deletions src/Attribute/AttributeAware.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,6 @@ public function getAttribute($name, $default = null);
*/
public function setAttribute($name, $value);

/**
* Removes a single attribute with the given $name
*
* @param string $name
*/
public function removeAttribute($name);

/**
* get a container for all attributes
*
Expand Down
1 change: 0 additions & 1 deletion src/Attribute/AttributeBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ interface AttributeBag extends AttributeAware
{
// public function getAttribute($name, $default);
// public function setAttribute($name, $value);
// public function removeAttribute();
// public function getAttributeBag();

/**
Expand Down
10 changes: 0 additions & 10 deletions src/Attribute/AttributeBagContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,6 @@ public function setAttribute($name, $value)
return $this;
}

/**
* Removes a single attribute with the given $name
*
* @param string $name
*/
public function removeAttribute($name)
{
unset($this->attributes[$name]);
}

/**
* get an array of all attributes
*
Expand Down
10 changes: 0 additions & 10 deletions src/Attribute/AttributeBagNamespaced.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ public function setAttribute($name, $value)
$this->bag->setAttribute($this->prefix . $name, $value);
}

/**
* Removes a single attribute with the given $name
*
* @param string $name
*/
public function removeAttribute($name)
{
$this->bag->removeAttribute($this->prefix . $name);
}

/**
* get an array of all attributes
*
Expand Down
10 changes: 0 additions & 10 deletions src/Attribute/AttributeBagReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ public function setAttribute($name, $value)
return $this;
}

/**
* Removes a single attribute with the given $name
*
* @param string $name
*/
public function removeAttribute($name)
{
unset($this->attributes[$name]);
}

/**
* get an array of all attributes
*
Expand Down
5 changes: 0 additions & 5 deletions src/Edge/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,6 @@ public function setAttribute($name, $value)
$this->attributes[$name] = $value;
}

public function removeAttribute($name)
{
unset($this->attributes[$name]);
}

public function getAttributeBag()
{
return new AttributeBagReference($this->attributes);
Expand Down
5 changes: 0 additions & 5 deletions src/Graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,6 @@ public function setAttribute($name, $value)
$this->attributes[$name] = $value;
}

public function removeAttribute($name)
{
unset($this->attributes[$name]);
}

public function getAttributeBag()
{
return new AttributeBagReference($this->attributes);
Expand Down
5 changes: 0 additions & 5 deletions src/Vertex.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@ public function setAttribute($name, $value)
$this->attributes[$name] = $value;
}

public function removeAttribute($name)
{
unset($this->attributes[$name]);
}

public function getAttributeBag()
{
return new AttributeBagReference($this->attributes);
Expand Down
13 changes: 0 additions & 13 deletions tests/Attribute/AbstractAttributeAwareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,6 @@ public function testAttributeSetGetDefault(AttributeAware $entity)
$this->assertEquals('default', $entity->getAttribute('unknown', 'default'));
}

/**
* @depends testAttributeAwareInterface
* @param AttributeAware $entity
*/
public function testAttributeSetRemoveGet(AttributeAware $entity)
{
$entity->setAttribute('test', 'value');
$this->assertEquals('value', $entity->getAttribute('test'));

$entity->removeAttribute('test');
$this->assertEquals(null, $entity->getAttribute('test'));
}

/**
* @depends testAttributeAwareInterface
* @param AttributeAware $entity
Expand Down

0 comments on commit b744a33

Please sign in to comment.