| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 35 | public function set_attribute( $name, $value = '' ) { |
||
| 36 | if ( ! in_array( $name, $this->allowed_attributes ) ) { |
||
| 37 | Incorrect_Syntax_Exception::raise( 'Only the following attributes are allowed: ' . implode( ', ', $this->allowed_attributes ) . '.' ); |
||
| 38 | return $this; |
||
| 39 | } |
||
| 40 | $this->attributes[ $name ] = $value; |
||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | |||
| 60 |