Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
refactor: run PHPCBF to fix PSR-2 violations.
Browse files Browse the repository at this point in the history
  • Loading branch information
ganoze authored Mar 22, 2019
1 parent fc2b81a commit a6b6c5f
Show file tree
Hide file tree
Showing 250 changed files with 1,067 additions and 1,126 deletions.
15 changes: 7 additions & 8 deletions GPL_LIB/smarty-plugins/block.t.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
*
* Installation: simply copy this file to the smarty plugins directory.
*
* @package smarty-gettext
* @version $Id: block.t.php,v 1.1 2005/07/27 17:58:56 sagi Exp $
* @link http://smarty-gettext.sourceforge.net/
* @author Sagi Bashari <sagi@boom.org.il>
* @package smarty-gettext
* @version $Id: block.t.php,v 1.1 2005/07/27 17:58:56 sagi Exp $
* @link http://smarty-gettext.sourceforge.net/
* @author Sagi Bashari <sagi@boom.org.il>
* @copyright 2004-2005 Sagi Bashari
*/

/**
* Replaces arguments in a string with their values.
* Arguments are represented by % followed by their number.
*
* @param string Source string
* @param mixed Arguments, can be passed in an array or through single variables.
* @returns string Modified string
* @param string Source string
* @param mixed Arguments, can be passed in an array or through single variables.
* @returns string Modified string
*/
function smarty_gettext_strarg($str)
{
Expand Down Expand Up @@ -118,4 +118,3 @@ function smarty_block_t($params, $text, &$smarty)

return $text;
}
?>
1 change: 0 additions & 1 deletion bin/centreon-partitioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,3 @@

echo "[" . date(DATE_RFC822) . "] PARTITIONING COMPLETED\n";
exit(0);

2 changes: 1 addition & 1 deletion bin/migrateWikiPages.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
$newName = str_replace(' ', '_', $newName);
$wikiApi->movePage($page, $newName);
}
}
}
2 changes: 0 additions & 2 deletions cron/centAcl.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ function programExit($msg)
"AND (all_hosts IS NOT NULL OR all_hostgroups IS NOT NULL OR all_servicegroups IS NOT NULL)";
$res = $pearDB->query($query);
while ($row = $res->fetch()) {

// manage acl_resources.changed flag
$aclResourcesUpdated = false;

Expand Down Expand Up @@ -460,7 +459,6 @@ function programExit($msg)
*/
$cpt = 0;
foreach ($tabGroups as $acl_group_id) {

/*
* Delete old data for this group
*/
Expand Down
1 change: 0 additions & 1 deletion cron/centreon-partitioning.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,3 @@

echo "[" . date(DATE_RFC822) . "] PARTITIONING COMPLETED\n";
exit(0);

1 change: 0 additions & 1 deletion cron/centstorage_purge.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@

echo "[" . date(DATE_RFC822) . "] PURGE COMPLETED\n";
exit(0);

1 change: 0 additions & 1 deletion cron/downtimeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
$downtimes = $downtimeObj->getApproachingDowntimes(_DELAY_);

foreach ($downtimes as $downtime) {

$isScheduled = $downtimeObj->isScheduled($downtime);

if (!$isScheduled && $downtime['dt_activate'] == '1') {
Expand Down
1 change: 0 additions & 1 deletion features/bootstrap/ACLResourcesAccessContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ function ($context) {
$this->tableau = array_unique($this->tableau);
throw new \Exception("Some properties are not being updated : " . implode(',', $this->tableau));
}

}

/**
Expand Down
1 change: 0 additions & 1 deletion features/bootstrap/BrokerConfigurationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ public function theOutputIsSaved()
$this->currentPage = new BrokerConfigurationListingPage($this);
$this->currentPage->getEntry($this->initialProperties['name']);
}

}
1 change: 0 additions & 1 deletion features/bootstrap/ContactConfigurationContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ function ($context) {
}
if ($value != $object[$key]) {
$this->tableau[] = $key;

}
}
if (($key == 'name' || $key == 'alias') && $value . '_1' != $object[$key]) {
Expand Down
1 change: 0 additions & 1 deletion features/bootstrap/DowntimeDSTContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ function ($context) {
$output,
$matches
)) {

$startTimestamp = (int)end($matches[1]);
$endTimestamp = (int)end($matches[2]);

Expand Down
2 changes: 0 additions & 2 deletions features/bootstrap/SaveSearchSelect2Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ function ($context) {
'jQuery("select#command_id").parent().find(".select2-search__field").val("load");'
);
$this->getSession()->wait(1000);


}

/**
Expand Down
2 changes: 0 additions & 2 deletions features/bootstrap/SelectAllSelect2Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ function ($context) {
return $context->getSession()->getPage()->has('css', '.centreon-popin .popin-wrapper');
}
);


}

/**
Expand Down
1 change: 0 additions & 1 deletion features/bootstrap/SpecialCharactersInContactContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function oneNonAdminContactHasBeenCreated()
'admin' => 0
));
$this->page->save();

}

/**
Expand Down
6 changes: 3 additions & 3 deletions features/bootstrap/URIContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function aCommentWhichContainsAnURI()
$this->page->save();

$this->spin(
function($context) {
function ($context) {
$context->page = new CommentMonitoringListingPage($context);
$context->page->getEntry("HOST;" . $this->hostname . ";1");
return true;
Expand All @@ -96,7 +96,7 @@ public function iClickOnTheLinkInTheServiceOutput()
{
$this->page = new ServiceMonitoringDetailsPage($this, $this->hostname, $this->serviceDescription);
$this->spin(
function($context) {
function ($context) {
$this->assertFind('css', 'table.ListTable td.ListColNoWrap.containsURI a')->click();
return true;
},
Expand All @@ -112,7 +112,7 @@ public function iClickOnTheLinkInTheComment()
{
$this->page = new CommentMonitoringListingPage($this);
$this->spin(
function($context) {
function ($context) {
$this->assertFind('css', 'table.ListTable td.ListColNoWrap.containsURI a')->click();
return true;
},
Expand Down
1 change: 0 additions & 1 deletion features/bootstrap/VirtualMetricHandleContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function allPropertiesAreCopiedExceptTheName()
if (key_exists($this->duplicatedVmName, $objects)) {
if ($objects[$this->duplicatedVmName]['function'] != $objects[$this->vmName]['function']
|| $objects[$this->duplicatedVmName]['def_type'] != $objects[$this->vmName]['def_type']) {

throw new \Exception('Some properties of ' . $this->duplicatedVmName . ' virtual Metric have not '
. 'been duplicated');
}
Expand Down
2 changes: 1 addition & 1 deletion features/bootstrap/WidgetContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function theWidgetIsRemoved()
// Wait for iFrame.
$this->spin(
function ($context) {
return $context->getSession()->getPage()->has('css', '#main-content');
return $context->getSession()->getPage()->has('css', '#main-content');
},
'iFrame (#main-content) did not appear.'
);
Expand Down
1 change: 0 additions & 1 deletion lib/Centreon/Object/Host/Macro/Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ class Centreon_Object_Host_Macro_Custom extends Centreon_Object
protected $table = "on_demand_macro_host";
protected $primaryKey = "host_macro_id";
protected $uniqueLabelField = "host_macro_name";

}
3 changes: 1 addition & 2 deletions lib/Centreon/Object/Instance/Instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,11 @@ class Centreon_Object_Instance extends Centreon_Object
public function getDefaultInstance()
{
$res = $this->db->query("SELECT `name` FROM `nagios_server` WHERE `is_default` = 1");
if( $res->rowCount() == 0) {
if ($res->rowCount() == 0) {
$res = $this->db->query("SELECT `name` FROM `nagios_server` WHERE `localhost` = '1'");
}

$row = $res->fetch();
return $row['name'];
}

}
1 change: 0 additions & 1 deletion lib/Centreon/Object/Service/Macro/Custom.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ class Centreon_Object_Service_Macro_Custom extends Centreon_Object
protected $table = "on_demand_macro_service";
protected $primaryKey = "svc_macro_id";
protected $uniqueLabelField = "svc_macro_name";

}
1 change: 0 additions & 1 deletion lib/Centreon/Object/Timeperiod/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ class Centreon_Object_Timeperiod_Exception extends Centreon_Object
protected $table = "timeperiod_exceptions";
protected $primaryKey = "exception_id";
protected $uniqueLabelField = "days";

}
Loading

0 comments on commit a6b6c5f

Please sign in to comment.