PHP-CS-Fixer
This commit is contained in:
parent
9eea8297f2
commit
eae820245e
@ -130,7 +130,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$db = Zend_Db::factory($c->profil->db->metier);
|
||||
} catch (Exception $e) {
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
echo '<pre>'; print_r($e); echo '</pre>';
|
||||
echo '<pre>';
|
||||
print_r($e);
|
||||
echo '</pre>';
|
||||
} else {
|
||||
echo "Le service rencontre actuellement un problème technique.";
|
||||
}
|
||||
@ -167,7 +169,9 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
|
||||
$conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
|
||||
} catch (\Doctrine\DBAL\DBALException $e) {
|
||||
if (APPLICATION_ENV == 'development') {
|
||||
echo '<pre>'; print_r($e); echo '</pre>';
|
||||
echo '<pre>';
|
||||
print_r($e);
|
||||
echo '</pre>';
|
||||
} else {
|
||||
echo "Le service rencontre actuellement un problème technique.";
|
||||
}
|
||||
|
@ -104,6 +104,4 @@ class DemoController extends Zend_Controller_Action
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,6 @@ class DocumentationController extends Zend_Controller_Action
|
||||
*/
|
||||
public function servicesAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -119,17 +118,14 @@ class DocumentationController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
if (array_key_exists($auth->getIdentity()->idClient, $wsClients)) {
|
||||
|
||||
$this->_forward('clients', 'documentation', null, array(
|
||||
'nom' => $wsClients[$auth->getIdentity()->idClient]
|
||||
));
|
||||
|
||||
} else {
|
||||
|
||||
// Liste des webservices
|
||||
$services = include APPLICATION_PATH . '/../library/WsScore/ServicesConfig.php';
|
||||
foreach( $services as $section => $params )
|
||||
{
|
||||
foreach ($services as $section => $params) {
|
||||
if ($params['actif']) {
|
||||
$wsServices[$section] = $params;
|
||||
}
|
||||
@ -138,15 +134,12 @@ class DocumentationController extends Zend_Controller_Action
|
||||
// On vérifie que l'utilisateur peut accèder à la documentation
|
||||
$username = $auth->getIdentity()->username;
|
||||
$idClient = $auth->getIdentity()->idClient;
|
||||
if ( array_key_exists($ws, $wsServices) )
|
||||
{
|
||||
if ( isset($wsServices['idClient']) && $idClient!=$wsServices['idClient'] )
|
||||
{
|
||||
if (array_key_exists($ws, $wsServices)) {
|
||||
if (isset($wsServices['idClient']) && $idClient!=$wsServices['idClient']) {
|
||||
$this->renderScript('documentation/nodoc.phtml');
|
||||
exit;
|
||||
}
|
||||
if ( isset($wsServices['user']) && !in_array($username, $wsServices['user']) )
|
||||
{
|
||||
if (isset($wsServices['user']) && !in_array($username, $wsServices['user'])) {
|
||||
$this->renderScript('documentation/nodoc.phtml');
|
||||
exit;
|
||||
}
|
||||
@ -189,7 +182,6 @@ class DocumentationController extends Zend_Controller_Action
|
||||
$this->view->assign('wsdl', $wsdl_url);
|
||||
$this->view->assign('serviceMethods', $tabServiceMethodsK);
|
||||
$this->view->assign('serviceTypes', $tabServiceTypes);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -229,4 +221,3 @@ class DocumentationController extends Zend_Controller_Action
|
||||
$this->view->assign('erreurs', $erreurs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,4 +44,3 @@ class ErrorController extends Zend_Controller_Action
|
||||
return $log;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,8 +67,7 @@ class FichierController extends Zend_Controller_Action
|
||||
} else {
|
||||
echo "Erreur lors de l'affichage du fichier.";
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo "Authentification échoué.";
|
||||
}
|
||||
}
|
||||
@ -130,8 +129,7 @@ class FichierController extends Zend_Controller_Action
|
||||
readfile($file);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->getResponse()->setHttpResponseCode(404);
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,15 @@
|
||||
<?php
|
||||
class IndexController extends Zend_Controller_Action
|
||||
{
|
||||
public function indexAction(){}
|
||||
|
||||
public function contactAction(){}
|
||||
|
||||
public function aboutAction(){}
|
||||
public function indexAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function contactAction()
|
||||
{
|
||||
}
|
||||
|
||||
public function aboutAction()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -27,9 +27,7 @@ class JsonrpcController extends Zend_Controller_Action
|
||||
exit;
|
||||
}
|
||||
$configServiceVersions = $clients[$client]['versions'];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
//Service versions
|
||||
$services = include APPLICATION_PATH . '/../library/WsScore/ServicesConfig.php';
|
||||
$configServiceVersions = $services[$serviceName]['versions'];
|
||||
|
@ -16,8 +16,7 @@ class RefController extends Zend_Controller_Action
|
||||
//Lecture du nom du fichier
|
||||
$fichier = $this->_getParam('q', '');
|
||||
$fichier = $fichier . '.csv';
|
||||
if (!empty($fichier) && file_exists('fichiers/'.$fichier))
|
||||
{
|
||||
if (!empty($fichier) && file_exists('fichiers/'.$fichier)) {
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
|
||||
@ -66,7 +65,9 @@ class RefController extends Zend_Controller_Action
|
||||
//Emplacement des fichiers générés - lien symbolique en PRODUCTION
|
||||
$c = Zend_Registry::get('config');
|
||||
$path = $c->profil->path->shared . '/files/fichiers/';
|
||||
if (!is_dir($path)) { mkdir($path); }
|
||||
if (!is_dir($path)) {
|
||||
mkdir($path);
|
||||
}
|
||||
if (!empty($requetesql)) {
|
||||
if (!file_exists($path . $fichierCsv)) {
|
||||
if (file_exists('assets/sql/'.$fichierSql)) {
|
||||
@ -94,8 +95,7 @@ class RefController extends Zend_Controller_Action
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
//Distribution du fichier sur la sortie standard
|
||||
list($nomFichier, $extFichier) = explode('.', $fichierCsv);
|
||||
switch ($extFichier)
|
||||
{
|
||||
switch ($extFichier) {
|
||||
case 'png': $content_type = 'image/png'; break;
|
||||
case 'gif': $content_type = 'image/gif'; break;
|
||||
case 'jpeg':
|
||||
@ -105,8 +105,7 @@ class RefController extends Zend_Controller_Action
|
||||
}
|
||||
$this->getResponse()->setHeader('Content-Type', $content_type);
|
||||
$contentDisposition = 'attachment';
|
||||
switch ($contentDisposition)
|
||||
{
|
||||
switch ($contentDisposition) {
|
||||
case 'inline':
|
||||
$this->getResponse()->setHeader('Content-Disposition', 'inline');
|
||||
break;
|
||||
@ -126,5 +125,4 @@ class RefController extends Zend_Controller_Action
|
||||
$this->view->assign('message', 'Paramètres incorrects !');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -75,15 +75,13 @@ class ServiceController extends Zend_Controller_Action
|
||||
|| array_key_exists('mode', $serviceVersions[$version])
|
||||
&& $serviceVersions[$version]['mode']=='auto') {
|
||||
$pathServiceUrl = 'clients/'.$client.'/v'.$version.'?wsdl-auto';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$pathServiceUrl = 'clients/'.$client.'/v'.$version.'?wsdl';
|
||||
}
|
||||
// --- On redéfini le nom du service
|
||||
$serviceClassName = 'Entreprise';
|
||||
$fichierWsdl = $clientClassName.'-'.$serviceClassName.'-'.$version.'.wsdl';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$pathServiceClassIni = 'WsScore/'.$serviceClassName.'/v'.$version.'/Config.php';
|
||||
$pathServiceClassPhp = 'WsScore/'.$serviceClassName.'/v'.$version.'/Service.php';
|
||||
// --- Gestion du mode de génération du wsdl
|
||||
@ -91,12 +89,10 @@ class ServiceController extends Zend_Controller_Action
|
||||
|| array_key_exists('mode', $serviceVersions[$version])
|
||||
&& $serviceVersions[$version]['mode']=='auto') {
|
||||
$pathServiceUrl = $serviceName.'/v'.$version.'?wsdl-auto';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$pathServiceUrl = $serviceName.'/v'.$version.'?wsdl';
|
||||
}
|
||||
$fichierWsdl = $serviceClassName.'-'.$version.'.wsdl';
|
||||
|
||||
}
|
||||
|
||||
// --- Get map of WSDL type to PHP Classes
|
||||
@ -117,8 +113,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
header('Content-Type: text/xml');
|
||||
}
|
||||
readfile($wsdlPath . '/' . $fichierWsdl);
|
||||
}
|
||||
elseif ( isset($_GET['wsdl']) && !file_exists($wsdlPath . '/' . $fichierWsdl)
|
||||
} elseif (isset($_GET['wsdl']) && !file_exists($wsdlPath . '/' . $fichierWsdl)
|
||||
|| isset($_GET['wsdl-generate'])
|
||||
|| isset($_GET['wsdl-auto'])) {
|
||||
// --- Définition du webservice
|
||||
@ -155,8 +150,7 @@ class ServiceController extends Zend_Controller_Action
|
||||
if (in_array(APPLICATION_ENV, array('production', 'staging'))
|
||||
&& file_exists($wsdlPath . '/' . $fichierWsdl)) {
|
||||
$server = new Zend_Soap_Server($wsdlPath . '/' . $fichierWsdl);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$server = new Zend_Soap_Server('http://'.$hostName.'/'.$pathServiceUrl);
|
||||
}
|
||||
|
||||
|
@ -3,7 +3,6 @@ class UserController extends Zend_Controller_Action
|
||||
{
|
||||
public function indexAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function loginAction()
|
||||
@ -42,7 +41,6 @@ class UserController extends Zend_Controller_Action
|
||||
$this->view->message.= $message."<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,5 @@ class Zend_View_Helper_DocComplement extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function docComplement($method)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
|
||||
{
|
||||
|
||||
protected $_transcodeType = array(
|
||||
'str' => 'string',
|
||||
'bool' => 'boolean',
|
||||
@ -57,5 +56,4 @@ class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -77,5 +77,4 @@ class Zend_View_Helper_DocParameter extends Zend_View_Helper_Abstract
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -70,5 +70,4 @@ class Zend_View_Helper_DocReturn extends Zend_View_Helper_Abstract
|
||||
return $type;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user