Completed
Push — master ( 010ee5...249aeb )
by Jean-Christophe
03:12
created

HtmlImg   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
lcom 0
cbo 2
dl 0
loc 21
rs 10
c 1
b 1
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A asAvatar() 0 5 2
A addContent() 0 1 1
1
<?php
2
3
namespace Ajax\semantic\html\elements\html5;
4
5
use Ajax\semantic\html\base\traits\BaseTrait;
6
7
class HtmlImg extends \Ajax\common\html\html5\HtmlImg {
8
	use BaseTrait;
9
10
	public function __construct($identifier, $src="", $alt="") {
11
		parent::__construct($identifier, $src, $alt);
12
		$this->_baseClass="ui image";
13
		$this->setClass($this->_baseClass);
14
	}
15
16
	public function asAvatar($caption=NULL) {
17
		if (isset($caption))
18
			$this->wrap("", $caption);
19
			return $this->addToProperty("class", "avatar");
20
	}
21
22
	/**
23
	 * {@inheritDoc}
24
	 * @see \Ajax\semantic\html\base\traits\BaseTrait::addContent()
25
	 */
26
	public function addContent($content, $before=false) {}
1 ignored issue
show
Unused Code introduced by
The parameter $content is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $before is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
27
}