Fix coding standards

This commit is contained in:
Romain Neutron
2012-01-26 12:32:37 +01:00
parent 692bb01b75
commit 06b8df26b1
312 changed files with 2017 additions and 1651 deletions

View File

@@ -76,10 +76,10 @@ class module_admin
, 'off_databoxes' => $off_databoxes
);
$core = \bootstrap::getCore();
$twig = $core->getTwig();
return $twig->render('admin/tree.html.twig', $params);
}

View File

@@ -34,7 +34,7 @@ class module_console_fileConfigCheck extends Command
/**
*
* @var \Alchemy\Phrasea\Core\Configuration
* @var \Alchemy\Phrasea\Core\Configuration
*/
protected $configuration;
protected $env;
@@ -169,6 +169,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check parsing file\n"), null, $e);
}
$output->writeln("<info>Parsing File OK</info>");
return;
}
@@ -183,6 +184,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check get selected environment\n"), null, $e);
}
$output->writeln("<info>Get Selected Environment OK</info>");
return;
}
@@ -203,6 +205,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check get selected environment from file\n"), null, $e);
}
$output->writeln("<info>Get Selected Environment from file OK</info>");
return;
}
@@ -262,6 +265,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>Phraseanet Scope OK</info>");
return;
}
@@ -297,6 +301,7 @@ class module_console_fileConfigCheck extends Command
throw new \Exception(sprintf("Check Database Scope\n"), null, $e);
}
$output->writeln("<info>Database Scope OK</info>");
return;
}
@@ -330,7 +335,7 @@ class module_console_fileConfigCheck extends Command
);
$service = $serviceBuilder->buildService();
if ($service->getType() === 'twig')
{
$twig = $service->getService();
@@ -383,6 +388,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>Template engine service OK</info>");
return;
}
@@ -391,6 +397,7 @@ class module_console_fileConfigCheck extends Command
if (!$this->connexionOk)
{
$output->writeln("<comment>As ORM service test depends on database test success, it is not executed</comment>");
return;
}
@@ -416,7 +423,7 @@ class module_console_fileConfigCheck extends Command
}
$registry = \registry::get_instance();
$serviceBuilder = new Core\ServiceBuilder\Orm(
$ormName
, $configuration
@@ -502,6 +509,7 @@ class module_console_fileConfigCheck extends Command
}
$output->writeln("<info>ORM service OK</info>");
return;
}

View File

@@ -62,9 +62,9 @@ class module_console_systemUpgrade extends Command
}
$conn = \connection::getPDOConnection();
$credentials = $conn->get_credentials();
$handler = new \Alchemy\Phrasea\Core\Configuration\Handler(
new \Alchemy\Phrasea\Core\Configuration\Application(),
new \Alchemy\Phrasea\Core\Configuration\Parser\Yaml()

View File

@@ -500,6 +500,7 @@ class module_report
public function getOrder($k = false)
{
if ($k === false)
return $this->tab_order;
return $this->tab_order[$k];
}
@@ -819,6 +820,7 @@ class module_report
public function buildReport($tab = false, $groupby = false, $on = false)
{
if (sizeof($this->report) > 0)
return $this->report;
$conn = connection::getPDOConnection($this->sbas_id);

View File

@@ -935,7 +935,7 @@ class module_report_activity extends module_report
AND (" . $collfilter['sql'] . ")
GROUP by ddate
ORDER BY ddate ASC";
$stmt = $conn->prepare($sql);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -951,7 +951,7 @@ class module_report_activity extends module_report
{
$res[$key] = number_format($act, 2, '.', '');
}
return $res;
}
@@ -1102,7 +1102,7 @@ class module_report_activity extends module_report
AND (" . $collfilter['sql'] . ")
GROUP BY ddate
ORDER BY activity ASC ";
$stmt = $conn->prepare($sql);
$stmt->execute($params);
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
@@ -1112,6 +1112,7 @@ class module_report_activity extends module_report
$date = new DateTime($row['ddate']);
$result[$date->format(DATE_ATOM)] = $row['activity'];
}
return $result;
}

View File

@@ -157,8 +157,10 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
public function isValid()
{
if (isset($this->dashboard) && sizeof($this->dashboard) > 0)
return true;
else
return false;
}
@@ -348,11 +350,11 @@ class module_report_dashboard implements module_report_dashboard_componentInterf
}
catch (Exception $e)
{
}
$i++;
}
return;
}

View File

@@ -75,9 +75,9 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
}
catch (Exception $e)
{
}
$tmp = new self($sbasid, $sbas_coll, $dmin, $dmax);
$appbox->set_data_to_cache($tmp, $cache_id);
@@ -131,7 +131,7 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
* @return <void>
*/
public function process()
{
{
try
{
//Get number of DLs
@@ -250,8 +250,9 @@ class module_report_dashboard_feed implements module_report_dashboard_componentI
}
catch(PDOException $e)
{
}
return;
}

View File

@@ -149,8 +149,10 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
public function isValid()
{
if (isset($this->arraySorted) && sizeof($this->arraySorted) > 0)
return true;
else
return false;
}
@@ -162,10 +164,11 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
public function getTop($nbtop)
{
if (!is_int($nbtop))
return array();
$tmp = array();
if ($this->isValid())
{
foreach ($this->arraySorted as $k => $v)
@@ -182,6 +185,7 @@ class module_report_dashboard_sort implements module_report_dashboard_componentI
}
}
}
return $tmp;
}

View File

@@ -38,7 +38,7 @@ class module_report_download extends module_report
'mime' => 'subdef.mime',
'file' => 'subdef.file'
);
/**
* constructor
*

View File

@@ -603,10 +603,10 @@ class module_report_nav extends module_report
, 'titre' => $record->get_title()
, 'taille' => $document->get_size()
);
$this->setDisplayNav();
$this->setReport();
return $this->report;
}