Merge branch 'feature/travis'

This commit is contained in:
Thomas Gelf 2017-01-11 23:58:57 +01:00
commit 3dff6848ec
14 changed files with 22 additions and 18 deletions

20
.travis.yml Normal file
View file

@ -0,0 +1,20 @@
language: php
php:
- '5.3'
- '5.4'
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- nightly
before_script:
- curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
- wget https://github.com/Icinga/icingaweb2/archive/v2.4.0.tar.gz
- tar xfz v2.4.0.tar.gz
- ln -s icingaweb2-2.4.0/library/Icinga
- ln -s icingaweb2-2.4.0/library/vendor/Zend
script:
- php phpcs.phar --report=full --standard=PSR2 --extensions=php -w library/Businessprocess/ application/ configuration.php run.php test
- phpunit --testdox || phpunit --verbose

View file

@ -143,7 +143,6 @@ class ProcessController extends Controller
protected function prepareRenderer($bp, $node)
{
if ($this->renderer === null) {
if ($this->params->get('mode') === 'tree') {
$renderer = new TreeRenderer($bp, $node);
} else {

View file

@ -177,7 +177,6 @@ class BpConfigForm extends QuickForm
)
);
$this->setSuccessMessage(sprintf('Process %s has been created', $name));
} else {
$config = $this->config;
$this->setSuccessMessage(sprintf('Process %s has been stored', $name));

View file

@ -163,7 +163,6 @@ class ProcessForm extends QuickForm
// TODO: rename
if ($node = $this->node) {
if ($display !== $node->getDisplay()) {
$modifications['display'] = $display;
}
@ -184,8 +183,8 @@ class ProcessForm extends QuickForm
'alias' => $alias,
);
}
if (! empty($modifications)) {
if (! empty($modifications)) {
if ($this->node === null) {
$changes->createNode($this->getValue('name'), $modifications);
} else {

View file

@ -629,7 +629,6 @@ class BpConfig
$nodes = array();
foreach ($this->getBpNodes() as $name => $node) {
if ($node->hasParents()) {
continue;
}

View file

@ -60,7 +60,6 @@ class Attributes
}
return $self;
} elseif ($attributes !== null) {
throw new IcingaException(
'Attributes, Array or Null expected, got %s',

View file

@ -164,7 +164,6 @@ class ImportedNode extends Node
'child_names' => $bp->listRootNodes(),
));
} catch (Exception $e) {
$this->createFailedNode($e);
}
}

View file

@ -26,7 +26,6 @@ class NodeModifyAction extends NodeAction
public function setNodeProperties(Node $node, array $properties)
{
foreach (array_keys($properties) as $key) {
$this->properties[$key] = $properties[$key];
if (array_key_exists($key, $this->formerProperties)) {

View file

@ -332,7 +332,6 @@ abstract class Node
// $path[] = $this->getName();
$paths[] = $path;
}
}
// TODO! -> for delete etc
return $paths;

View file

@ -227,7 +227,6 @@ class NodeTile extends BaseElement
null,
array('data-base-target' => '_next')
));
} elseif ($node instanceof HostNode) {
$this->actions()->add(Link::create(
Icon::create('host'),
@ -237,7 +236,6 @@ class NodeTile extends BaseElement
));
}
}
}
protected function addActionLinks()

View file

@ -97,13 +97,11 @@ class Simulation
{
$simulations = $this->simulations();
if (array_key_exists($node, $simulations)) {
unset($simulations[$node]);
$this->setSimulations($simulations);
return true;
} else {
return false;
}
}

View file

@ -92,7 +92,6 @@ class LegacyConfigRenderer
$name = $node->getName();
if (array_key_exists($name, $this->renderedNodes)) {
return '';
} else {
$this->renderedNodes[$name] = true;
@ -183,10 +182,8 @@ class LegacyConfigRenderer
$str = implode(' ' . $op . ' ', $children);
if ((count($children) < 2) && $op !== '&') {
return $op . ' ' . $str;
} else {
return $str;
}
}

View file

@ -69,7 +69,6 @@ class Dashboard extends BaseElement
array('class' => 'addnew')
)
);
} elseif (empty($processes)) {
$this->addContent(
Container::create()

View file

@ -149,8 +149,8 @@ abstract class QuickForm extends QuickBaseForm
'Fieldset',
);
}
return $this->addDisplayGroup($elements, $name, $options);
return $this->addDisplayGroup($elements, $name, $options);
}
protected function createIdElement()