Fix psr2 CS

This commit is contained in:
Michael RICOIS 2016-11-24 13:55:22 +01:00
parent 6356f3566c
commit 2598a463b7

View File

@ -51,8 +51,7 @@ class Metier_Liens_Base
{ {
if ($conn === null) { if ($conn === null) {
$this->conn = Zend_Registry::get('doctrine'); $this->conn = Zend_Registry::get('doctrine');
} } else {
else {
$this->conn = $conn; $this->conn = $conn;
} }
} }
@ -76,12 +75,10 @@ class Metier_Liens_Base
$result = $stmt->fetch(\PDO::FETCH_OBJ); $result = $stmt->fetch(\PDO::FETCH_OBJ);
$this->idRef = $result->id; $this->idRef = $result->id;
} }
} } catch (\Doctrine\DBAL\DBALException $e) {
catch (\Doctrine\DBAL\DBALException $e) {
throw new Exception(__METHOD__ . ': ' . $e->getMessage()); throw new Exception(__METHOD__ . ': ' . $e->getMessage());
} }
} } else {
else {
$this->idRef = $id; $this->idRef = $id;
} }
} }
@ -133,8 +130,7 @@ class Metier_Liens_Base
$qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'"); $qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'");
$stmt = $qb->execute(); $stmt = $qb->execute();
$liens = $stmt->fetchAll(\PDO::FETCH_OBJ); $liens = $stmt->fetchAll(\PDO::FETCH_OBJ);
} } catch (\Doctrine\DBAL\DBALException $e) {
catch (\Doctrine\DBAL\DBALException $e) {
throw new Exception(__METHOD__ . ': ' . $e->getMessage()); throw new Exception(__METHOD__ . ': ' . $e->getMessage());
} }
@ -194,8 +190,7 @@ class Metier_Liens_Base
$qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'"); $qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'");
$stmt = $qb->execute(); $stmt = $qb->execute();
$liens = $stmt->fetchAll(\PDO::FETCH_OBJ); $liens = $stmt->fetchAll(\PDO::FETCH_OBJ);
} } catch (\Doctrine\DBAL\DBALException $e) {
catch (\Doctrine\DBAL\DBALException $e) {
throw new Exception(__METHOD__ . ': ' . $e->getMessage()); throw new Exception(__METHOD__ . ': ' . $e->getMessage());
} }
@ -215,8 +210,7 @@ class Metier_Liens_Base
$stmt->bindValue('id', $this->idRef); $stmt->bindValue('id', $this->idRef);
$result = $stmt->fetch(\PDO::FETCH_OBJ); $result = $stmt->fetch(\PDO::FETCH_OBJ);
$siren = $result->siren; $siren = $result->siren;
} } else {
else {
$siren = $this->siren; $siren = $this->siren;
} }
@ -234,8 +228,7 @@ class Metier_Liens_Base
if (null !== $actif) { if (null !== $actif) {
if (false === $actif) { if (false === $actif) {
$qb->andWhere('actif = 0'); $qb->andWhere('actif = 0');
} } else {
else {
$qb->andWhere('actif = 1'); $qb->andWhere('actif = 1');
} }
} }
@ -393,7 +386,9 @@ class Metier_Liens_Base
*/ */
public function getTreeRecursive($id, $pctMin=33, $niveau=0, $nbNiveaux=10) public function getTreeRecursive($id, $pctMin=33, $niveau=0, $nbNiveaux=10)
{ {
if ( $niveau > $nbNiveaux ) return array(); if ($niveau > $nbNiveaux) {
return array();
}
$niveau++; $niveau++;
$tabRet = array(); $tabRet = array();
@ -506,7 +501,6 @@ class Metier_Liens_Base
$this->findId[] = $identity->id; $this->findId[] = $identity->id;
$output = $output + $this->getListeGroupeCAC40($identity->id, $pctMin); $output = $output + $this->getListeGroupeCAC40($identity->id, $pctMin);
} }
} }
} }
} }