Skip to content

Commit b744a33

Browse files
authored
Merge pull request #171 from clue-labs/revert-remove-attribute
Revert "Merge pull request #138 from clue-labs/remove-attribute"
2 parents 1eafe38 + 09ea558 commit b744a33

9 files changed

Lines changed: 0 additions & 66 deletions

src/Attribute/AttributeAware.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,6 @@ public function getAttribute($name, $default = null);
2626
*/
2727
public function setAttribute($name, $value);
2828

29-
/**
30-
* Removes a single attribute with the given $name
31-
*
32-
* @param string $name
33-
*/
34-
public function removeAttribute($name);
35-
3629
/**
3730
* get a container for all attributes
3831
*

src/Attribute/AttributeBag.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ interface AttributeBag extends AttributeAware
99
{
1010
// public function getAttribute($name, $default);
1111
// public function setAttribute($name, $value);
12-
// public function removeAttribute();
1312
// public function getAttributeBag();
1413

1514
/**

src/Attribute/AttributeBagContainer.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ public function setAttribute($name, $value)
4141
return $this;
4242
}
4343

44-
/**
45-
* Removes a single attribute with the given $name
46-
*
47-
* @param string $name
48-
*/
49-
public function removeAttribute($name)
50-
{
51-
unset($this->attributes[$name]);
52-
}
53-
5444
/**
5545
* get an array of all attributes
5646
*

src/Attribute/AttributeBagNamespaced.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,6 @@ public function setAttribute($name, $value)
6868
$this->bag->setAttribute($this->prefix . $name, $value);
6969
}
7070

71-
/**
72-
* Removes a single attribute with the given $name
73-
*
74-
* @param string $name
75-
*/
76-
public function removeAttribute($name)
77-
{
78-
$this->bag->removeAttribute($this->prefix . $name);
79-
}
80-
8171
/**
8272
* get an array of all attributes
8373
*

src/Attribute/AttributeBagReference.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ public function setAttribute($name, $value)
5555
return $this;
5656
}
5757

58-
/**
59-
* Removes a single attribute with the given $name
60-
*
61-
* @param string $name
62-
*/
63-
public function removeAttribute($name)
64-
{
65-
unset($this->attributes[$name]);
66-
}
67-
6858
/**
6959
* get an array of all attributes
7060
*

src/Edge/Base.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,6 @@ public function setAttribute($name, $value)
301301
$this->attributes[$name] = $value;
302302
}
303303

304-
public function removeAttribute($name)
305-
{
306-
unset($this->attributes[$name]);
307-
}
308-
309304
public function getAttributeBag()
310305
{
311306
return new AttributeBagReference($this->attributes);

src/Graph.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,6 @@ public function setAttribute($name, $value)
457457
$this->attributes[$name] = $value;
458458
}
459459

460-
public function removeAttribute($name)
461-
{
462-
unset($this->attributes[$name]);
463-
}
464-
465460
public function getAttributeBag()
466461
{
467462
return new AttributeBagReference($this->attributes);

src/Vertex.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,6 @@ public function setAttribute($name, $value)
399399
$this->attributes[$name] = $value;
400400
}
401401

402-
public function removeAttribute($name)
403-
{
404-
unset($this->attributes[$name]);
405-
}
406-
407402
public function getAttributeBag()
408403
{
409404
return new AttributeBagReference($this->attributes);

tests/Attribute/AbstractAttributeAwareTest.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@ public function testAttributeSetGetDefault(AttributeAware $entity)
3131
$this->assertEquals('default', $entity->getAttribute('unknown', 'default'));
3232
}
3333

34-
/**
35-
* @depends testAttributeAwareInterface
36-
* @param AttributeAware $entity
37-
*/
38-
public function testAttributeSetRemoveGet(AttributeAware $entity)
39-
{
40-
$entity->setAttribute('test', 'value');
41-
$this->assertEquals('value', $entity->getAttribute('test'));
42-
43-
$entity->removeAttribute('test');
44-
$this->assertEquals(null, $entity->getAttribute('test'));
45-
}
46-
4734
/**
4835
* @depends testAttributeAwareInterface
4936
* @param AttributeAware $entity

0 commit comments

Comments
 (0)