Fixed namespaces (PHPCI -> PHPCensor)
This commit is contained in:
parent
60d74b0b44
commit
60a2b7282a
238 changed files with 1014 additions and 863 deletions
63
src/PHPCensor/Model/BuildError.php
Normal file
63
src/PHPCensor/Model/BuildError.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* BuildError model for table: build_error
|
||||
*/
|
||||
|
||||
namespace PHPCensor\Model;
|
||||
|
||||
use PHPCensor\Model\Base\BuildErrorBase;
|
||||
|
||||
/**
|
||||
* BuildError Model
|
||||
* @uses PHPCI\Model\Base\BuildErrorBase
|
||||
*/
|
||||
class BuildError extends BuildErrorBase
|
||||
{
|
||||
const SEVERITY_CRITICAL = 0;
|
||||
const SEVERITY_HIGH = 1;
|
||||
const SEVERITY_NORMAL = 2;
|
||||
const SEVERITY_LOW = 3;
|
||||
|
||||
/**
|
||||
* Get the language string key for this error's severity level.
|
||||
* @return string
|
||||
*/
|
||||
public function getSeverityString()
|
||||
{
|
||||
switch ($this->getSeverity()) {
|
||||
case self::SEVERITY_CRITICAL:
|
||||
return 'critical';
|
||||
|
||||
case self::SEVERITY_HIGH:
|
||||
return 'high';
|
||||
|
||||
case self::SEVERITY_NORMAL:
|
||||
return 'normal';
|
||||
|
||||
case self::SEVERITY_LOW:
|
||||
return 'low';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the class to apply to HTML elements representing this error.
|
||||
* @return string
|
||||
*/
|
||||
public function getSeverityClass()
|
||||
{
|
||||
switch ($this->getSeverity()) {
|
||||
case self::SEVERITY_CRITICAL:
|
||||
return 'danger';
|
||||
|
||||
case self::SEVERITY_HIGH:
|
||||
return 'warning';
|
||||
|
||||
case self::SEVERITY_NORMAL:
|
||||
return 'info';
|
||||
|
||||
case self::SEVERITY_LOW:
|
||||
return 'default';
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue