PHP-CS-Fixer

This commit is contained in:
Michael RICOIS 2016-11-29 15:10:11 +01:00
parent 9eea8297f2
commit eae820245e
18 changed files with 1266 additions and 1288 deletions

View File

@ -9,7 +9,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
define('MYSQL_HOST', $config->profil->db->metier->params->host);
define('MYSQL_USER', $config->profil->db->metier->params->username);
define('MYSQL_PASS', $config->profil->db->metier->params->password);
define('LOG_PATH' , $config->profil->path->shared.'/log');
define('LOG_PATH', $config->profil->path->shared.'/log');
// Entreprise
define('SPHINX_ENT_HOST', $config->profil->sphinx->ent->host);
@ -93,7 +93,7 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
// Lire les services disponibles et créer les routes
$services = require_once APPLICATION_PATH . '/../library/WsScore/ServicesConfig.php';
foreach( $services as $section => $params ) {
foreach ($services as $section => $params) {
if ($params['actif']) {
$route = new Zend_Controller_Router_Route($section.'/:version', array(
'controller' => 'service',
@ -128,9 +128,11 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
$c = new Zend_Config($this->getOptions());
try {
$db = Zend_Db::factory($c->profil->db->metier);
} catch ( Exception $e ) {
} 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.";
}
@ -179,14 +183,14 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
protected function _initCache()
{
if ( APPLICATION_ENV!='development' ) {
if (APPLICATION_ENV!='development') {
//MetadataCache pour la base de données
$frontendOptions = array(
'lifetime' => 14400,
'automatic_serialization' => true
);
$backendOptions = array();
$cache = Zend_Cache::factory('Core','Apc', $frontendOptions, $backendOptions);
$cache = Zend_Cache::factory('Core', 'Apc', $frontendOptions, $backendOptions);
Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);
}
}

View File

@ -24,7 +24,7 @@ class DemoController extends Zend_Controller_Action
$tabMethods = array();
foreach($this->methods as $method => $element){
foreach ($this->methods as $method => $element) {
$url = $this->view->url(array(
'controller' => 'demo',
'action' => 'method',
@ -41,12 +41,12 @@ class DemoController extends Zend_Controller_Action
public function methodAction()
{
$method = $this->_getParam('name','');
$method = $this->_getParam('name', '');
$this->view->assign('method', $method);
//Affichage du formulaire
if (array_key_exists($method, $this->methods)){
if (array_key_exists($method, $this->methods)) {
$class = 'Scores_Ws_Form_'.ucfirst($method);
if (class_exists($class)){
if (class_exists($class)) {
$form = new $class;
$form->addElement('hidden', 'method', array(
'value' => $method,
@ -57,7 +57,7 @@ class DemoController extends Zend_Controller_Action
}
$this->view->assign('form', $form);
} else {
$this->view->assign('message',"Impossible d'afficher le formulaire !");
$this->view->assign('message', "Impossible d'afficher le formulaire !");
}
}
}
@ -92,18 +92,16 @@ class DemoController extends Zend_Controller_Action
'requete' => $params,
'reponse' => $reponse,
);
$this->view->assign('soap',$soap);
$this->view->assign('soap', $soap);
$xml = array(
'requete' => $client->getLastRequest(),
'reponse' => $client->getLastResponse()
);
$this->view->assign('xml',$xml);
$this->view->assign('xml', $xml);
} else {
$this->_forward('method', 'demo', null, array('name'=> 'getIdentite'));
}
}
}
}
}

View File

@ -15,7 +15,6 @@ class DocumentationController extends Zend_Controller_Action
*/
public function servicesAction()
{
}
/**
@ -33,14 +32,14 @@ class DocumentationController extends Zend_Controller_Action
{
$request = $this->getRequest();
$type = $request->getParam('type', 'sd');
$ws = strtolower($request->getParam('name','entreprise'));
$ws = strtolower($request->getParam('name', 'entreprise'));
$myService = $this->view->WsServices[$ws];
// Gestion des versions
$serviceVersions = array();
$configServiceVersions = $myService['versions'];
foreach( $configServiceVersions as $section => $params ){
foreach ($configServiceVersions as $section => $params) {
$serviceVersions[$section] = $params;
if ($params['defaut']) {
$defautVersion = $section;
@ -52,18 +51,18 @@ class DocumentationController extends Zend_Controller_Action
$this->view->assign('serviceVersion', $version);
$isDeprecated = false;
if ( $myService['versions'][$version]['defaut'] == '' ) {
if ($myService['versions'][$version]['defaut'] == '') {
$isDeprecated = true;
}
$this->view->assign('isDeprecated', $isDeprecated);
if ( $type == 'client') {
if ($type == 'client') {
$client = $ws;
$ws = 'entreprise';
}
// Charger les classes et les types pour le service suivant la version
if ( $type == 'client') {
if ($type == 'client') {
$pathClassService = 'WsScore/Clients/'.ucfirst($client).'/v'.$version.'/';
} else {
$pathClassService = 'WsScore/'.ucfirst($ws).'/v'.$version.'/';
@ -74,12 +73,12 @@ class DocumentationController extends Zend_Controller_Action
//Définir l'url d'accès au WSDL
$wsdl_url = $this->view->baseUrl();
if ( $type == 'client') {
if ($type == 'client') {
$wsdl_url.= '/clients/'.$client.'/v'.$version;
} else {
$wsdl_url.= '/'.$ws.'/v'.$version;
}
if (APPLICATION_ENV == 'production'){
if (APPLICATION_ENV == 'production') {
$wsdl_url.= '?wsdl';
} else {
$wsdl_url.= '?wsdl-auto';
@ -90,7 +89,7 @@ class DocumentationController extends Zend_Controller_Action
$tabServiceMethods = $doc->getServiceMethods();
// Tri des méthodes par ordre alphabétique
$tabServiceMethodsK = array();
foreach($tabServiceMethods as $method) {
foreach ($tabServiceMethods as $method) {
$tabServiceMethodsK[$method['name']] = $method;
}
ksort($tabServiceMethodsK);
@ -107,29 +106,26 @@ class DocumentationController extends Zend_Controller_Action
public function exemplesAction()
{
$request = $this->getRequest();
$ws = strtolower($request->getParam('ws','Entreprise'));
$ws = strtolower($request->getParam('ws', 'Entreprise'));
$auth = Zend_Auth::getInstance();
//Si client possède un webservice particulier alors on redirige vers la doc clients
$clients = include APPLICATION_PATH . '/../library/WsScore/Clients/ClientsConfig.php';
foreach( $clients as $section => $params ){
foreach ($clients as $section => $params) {
if ($params['actif']) {
$wsClients[$params['idClient']] = $section;
}
}
if (array_key_exists($auth->getIdentity()->idClient, $wsClients)){
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;
}
@ -155,7 +148,7 @@ class DocumentationController extends Zend_Controller_Action
// Gestion des versions
$serviceVersions = array();
$configServiceVersions = $wsServices[$ws]['versions'];
foreach( $configServiceVersions as $section => $params ){
foreach ($configServiceVersions as $section => $params) {
$serviceVersions[$section] = $params;
if ($params['defaut']) {
$defautVersion = $section;
@ -171,7 +164,7 @@ class DocumentationController extends Zend_Controller_Action
//Définir l'url d'accès au WSDL
$wsdl_url = $this->view->baseUrl();
if (APPLICATION_ENV == 'production'){
if (APPLICATION_ENV == 'production') {
$wsdl_url.= '/'.$ws.'/v'.$version.'?wsdl';
} else {
$wsdl_url.= '/'.$ws.'/v'.$version.'?wsdl-auto';
@ -181,7 +174,7 @@ class DocumentationController extends Zend_Controller_Action
$tabServiceMethods = $doc->getServiceMethods();
// Tri des méthodes par ordre alphabétique
$tabServiceMethodsK = array();
foreach($tabServiceMethods as $method) {
foreach ($tabServiceMethods as $method) {
$tabServiceMethodsK[$method['name']] = $method;
}
ksort($tabServiceMethodsK);
@ -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);
}
}
@ -200,11 +192,11 @@ class DocumentationController extends Zend_Controller_Action
*/
public function codeAction()
{
$langage = strtolower($this->_getParam('langage',''));
$element = $this->_getParam('element','');
$langage = strtolower($this->_getParam('langage', ''));
$element = $this->_getParam('element', '');
$fichier = APPLICATION_PATH . '/../public/assets/code/' . $element . '-' . $langage . '.txt';
if (file_exists($fichier)){
if (file_exists($fichier)) {
$sourceCode = file_get_contents($fichier);
$geshi = new GeSHi($sourceCode, $langage);
@ -229,4 +221,3 @@ class DocumentationController extends Zend_Controller_Action
$this->view->assign('erreurs', $erreurs);
}
}

View File

@ -44,4 +44,3 @@ class ErrorController extends Zend_Controller_Action
return $log;
}
}

View File

@ -67,8 +67,7 @@ class FichierController extends Zend_Controller_Action
} else {
echo "Erreur lors de l'affichage du fichier.";
}
}
else {
} else {
echo "Authentification échoué.";
}
}
@ -80,7 +79,7 @@ class FichierController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/'.$filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);
@ -111,7 +110,7 @@ class FichierController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/'. $filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);
@ -130,8 +129,7 @@ class FichierController extends Zend_Controller_Action
readfile($file);
exit;
}
}
else {
} else {
$this->getResponse()->setHttpResponseCode(404);
}
}
@ -143,7 +141,7 @@ class FichierController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = realpath($c->profil->path->shared).'/datafile/kbis/'.$filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);
@ -174,7 +172,7 @@ class FichierController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/' . $filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);
@ -205,7 +203,7 @@ class FichierController extends Zend_Controller_Action
$c = Zend_Registry::get('config');
$file = $c->profil->path->shared . '/files/' .$filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);
@ -237,7 +235,7 @@ class FichierController extends Zend_Controller_Action
$file = $c->profil->path->shared . '/files/' .$filename;
// --- Envoi du fichier sur la sortie standard
if ( file_exists($file) ) {
if (file_exists($file)) {
$modules = array(); //apache_get_modules();
if (in_array('mod_xsendfile', $modules)) {
header('X-Sendfile: ' . $file);

View File

@ -1,10 +1,15 @@
<?php
class IndexController extends Zend_Controller_Action
{
public function indexAction(){}
public function indexAction()
{
}
public function contactAction(){}
public function contactAction()
{
}
public function aboutAction(){}
public function aboutAction()
{
}
}

View File

@ -17,26 +17,24 @@ class JsonrpcController extends Zend_Controller_Action
//Liste des clients
$clients = array();
$listeClients = include APPLICATION_PATH . '/../library/WsScore/Clients/ClientsConfig.php';
foreach ( $listeClients as $section => $params ) {
if ($params['actif']){
foreach ($listeClients as $section => $params) {
if ($params['actif']) {
$clients[] = $section;
}
}
if (!in_array($client, $clients)){
if (!in_array($client, $clients)) {
echo 'Service clients introuvable !';
exit;
}
$configServiceVersions = $clients[$client]['versions'];
}
else
{
} else {
//Service versions
$services = include APPLICATION_PATH . '/../library/WsScore/ServicesConfig.php';
$configServiceVersions = $services[$serviceName]['versions'];
}
//Liste des versions
foreach( $configServiceVersions as $section => $params ) {
foreach ($configServiceVersions as $section => $params) {
$serviceVersions[$section] = $params;
if ($params['defaut']) {
$defautVersion = $section;
@ -46,12 +44,12 @@ class JsonrpcController extends Zend_Controller_Action
$version = substr($version, 1);
// Version inexistante
if ( !array_key_exists($version, $serviceVersions) ) {
if (!array_key_exists($version, $serviceVersions)) {
echo "Version inexistante.";
exit;
}
// Version désactivé
if ( !$serviceVersions[$version]['actif'] ) {
if (!$serviceVersions[$version]['actif']) {
echo "Version désactivée.";
exit;
}
@ -73,7 +71,7 @@ class JsonrpcController extends Zend_Controller_Action
//Génération du tableau de mapping
$wsConfig = new Zend_Config_Ini($pathServiceClassIni);
foreach($wsConfig->Type->toArray() as $Type){
foreach ($wsConfig->Type->toArray() as $Type) {
$classmap[$Type] = $Type;
}
@ -86,7 +84,7 @@ class JsonrpcController extends Zend_Controller_Action
$server->setClass(ucfirst($serviceName));
// Gestion du SMD
if($this->getRequest()->isGet()){
if ($this->getRequest()->isGet()) {
// Indiquer URL endpoint
//$this->getHelper('url')->url(array('controller'=>'', 'action'=>'' ));
$server->setTarget('/jsonrpc/'.$serviceName.'/'.$version.'/')

View File

@ -14,22 +14,21 @@ class RefController extends Zend_Controller_Action
public function fichierAction()
{
//Lecture du nom du fichier
$fichier = $this->_getParam('q','');
$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();
list($nomFichier, $extFichier) = explode('.',$fichier);
list($nomFichier, $extFichier) = explode('.', $fichier);
//Distribution du fichier sur la sortie standard
switch ($extFichier) {
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
case 'png': $content_type = 'image/png'; break;
case 'gif': $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
case 'pdf' : $content_type = 'application/pdf'; break;
case 'csv' : $content_type = 'application/csv-tab-delimited-table'; break;
case 'jpg': $content_type = 'image/jpeg'; break;
case 'pdf': $content_type = 'application/pdf'; break;
case 'csv': $content_type = 'application/csv-tab-delimited-table'; break;
}
$this->getResponse()->setHeader('Content-Type', $content_type);
$contentDisposition = 'attachment';
@ -59,14 +58,16 @@ class RefController extends Zend_Controller_Action
public function tableAction()
{
$request = $this->getRequest();
$requetesql = $request->getParam('q','');
$requetesql = $request->getParam('q', '');
$fichierCsv = $requetesql.'.csv';
$fichierSql = $requetesql.'.sql';
//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)) {
@ -93,20 +94,18 @@ class RefController extends Zend_Controller_Action
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
//Distribution du fichier sur la sortie standard
list($nomFichier, $extFichier) = explode('.',$fichierCsv);
switch ($extFichier)
{
case 'png' : $content_type = 'image/png'; break;
case 'gif' : $content_type = 'image/gif'; break;
list($nomFichier, $extFichier) = explode('.', $fichierCsv);
switch ($extFichier) {
case 'png': $content_type = 'image/png'; break;
case 'gif': $content_type = 'image/gif'; break;
case 'jpeg':
case 'jpg' : $content_type = 'image/jpeg'; break;
case 'pdf' : $content_type = 'application/pdf'; break;
case 'csv' : $content_type = 'application/csv-tab-delimited-table'; break;
case 'jpg': $content_type = 'image/jpeg'; break;
case 'pdf': $content_type = 'application/pdf'; break;
case 'csv': $content_type = 'application/csv-tab-delimited-table'; break;
}
$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 !');
}
}
}

View File

@ -28,7 +28,7 @@ class ServiceController extends Zend_Controller_Action
// --- Get list of customers
$clients = array();
$listeClients = include APPLICATION_PATH . '/../library/WsScore/Clients/ClientsConfig.php';
foreach ( $listeClients as $section => $params ) {
foreach ($listeClients as $section => $params) {
if ($params['actif']) {
$clients[$section] = $params;
}
@ -71,32 +71,28 @@ class ServiceController extends Zend_Controller_Action
$pathServiceClassIni = 'WsScore/Clients/'.$clientClassName.'/v'.$version.'/Config.php';
$pathServiceClassPhp = 'WsScore/Clients/'.$clientClassName.'/v'.$version.'/Service.php';
// --- Gestion du mode de génération du wsdl
if ( APPLICATION_ENV == 'development'
if (APPLICATION_ENV == 'development'
|| 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
if ( APPLICATION_ENV == 'development'
if (APPLICATION_ENV == 'development'
|| 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,19 +113,18 @@ 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']) ) {
|| isset($_GET['wsdl-auto'])) {
// --- Définition du webservice
$wsdl = new Zend_Soap_AutoDiscover();
$wsdl->setComplexTypeStrategy('Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence');
$wsdl->setOperationBodyStyle( array('use' => 'literal') );
$wsdl->setBindingStyle( array('style' => 'document') );
$wsdl->setOperationBodyStyle(array('use' => 'literal'));
$wsdl->setBindingStyle(array('style' => 'document'));
$wsdl->setClass($serviceClassName);
// --- Enregistrement du WSDL dans un fichier
if ( isset($_GET['wsdl-generate']) ) {
if (isset($_GET['wsdl-generate'])) {
if (file_exists($wsdlPath . '/' . $fichierWsdl)) {
unlink($wsdlPath . '/' . $fichierWsdl);
}
@ -139,13 +134,13 @@ class ServiceController extends Zend_Controller_Action
// --- Génération/Fourniture du wsdl
} elseif (isset($_GET['wsdl']) && !file_exists($wsdlPath . '/' . $fichierWsdl)) {
$wsdl->dump($wsdlPath . '/' . $fichierWsdl);
if ( !headers_sent() ) {
if (!headers_sent()) {
header('Content-Type: text/xml');
}
readfile($wsdlPath . '/' . $fichierWsdl);
}
// --- Envoi sur la sortie standard le wsdl sans enregistrement dans un fichier
elseif ( isset($_GET['wsdl-auto']) ){
elseif (isset($_GET['wsdl-auto'])) {
$wsdl->handle();
}
}
@ -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);
}

View File

@ -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/>";
}
}
}
}
}
@ -120,9 +118,9 @@ class UserController extends Zend_Controller_Action
);
$display = array();
foreach ( $listdroit as $droit ) {
foreach ( $assoc as $l => $d ) {
if ( in_array(strtoupper($droit), $d) ) {
foreach ($listdroit as $droit) {
foreach ($assoc as $l => $d) {
if (in_array(strtoupper($droit), $d)) {
$display[] = array(
'label' => $l,
'droit' => $droit,

View File

@ -3,6 +3,5 @@ class Zend_View_Helper_DocComplement extends Zend_View_Helper_Abstract
{
public function docComplement($method)
{
}
}

View File

@ -12,9 +12,9 @@ class Zend_View_Helper_DocExemple extends Zend_View_Helper_Abstract
'csharp' => 'C#'
);
foreach ($langages as $langage => $lib){
foreach ($langages as $langage => $lib) {
$fichier = 'assets/code/'.$method.'-'.$langage.'.txt';
if (file_exists($fichier)){
if (file_exists($fichier)) {
$url = $this->view->url(
array(
'controller' => 'documentation',

View File

@ -1,7 +1,6 @@
<?php
class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
{
protected $_transcodeType = array(
'str' => 'string',
'bool' => 'boolean',
@ -28,9 +27,9 @@ class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
if (isset($param['optional'])) {
if (isset($param['defaultValue'])) {
$parameters.= ' = ';
if (is_bool($param['defaultValue'])){
if (is_bool($param['defaultValue'])) {
$parameters.= ($param['defaultValue'] === false) ? 'false' : 'true' ;
} elseif (is_string($param['defaultValue']) && $param['defaultValue']==''){
} elseif (is_string($param['defaultValue']) && $param['defaultValue']=='') {
$parameters.= "''";
} else {
$parameters.= $param['defaultValue'];
@ -39,7 +38,7 @@ class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
$parameters.= ']';
}
$cptParameters++;
if ($cptParameters < count($method['params'])){
if ($cptParameters < count($method['params'])) {
$parameters.= ', ';
}
}
@ -51,11 +50,10 @@ class Zend_View_Helper_DocMethod extends Zend_View_Helper_Abstract
private function transcodeType($type)
{
if(array_key_exists($type, $this->_transcodeType)){
if (array_key_exists($type, $this->_transcodeType)) {
return $this->_transcodeType[$type];
} else {
return $type;
}
}
}

View File

@ -44,7 +44,7 @@ class Zend_View_Helper_DocParameter extends Zend_View_Helper_Abstract
$output.= '</ul>';
} elseif (in_array($type, $this->types)) {
$output.= '';
} elseif ($type == 'void'){
} elseif ($type == 'void') {
$output.= 'Void';
} else {
$output.= ' => <b>Type '.$type.' inconnu</b>';
@ -71,11 +71,10 @@ class Zend_View_Helper_DocParameter extends Zend_View_Helper_Abstract
private function transcodeType($type)
{
if(array_key_exists($type, $this->_transcodeType)){
if (array_key_exists($type, $this->_transcodeType)) {
return $this->_transcodeType[$type];
} else {
return $type;
}
}
}

View File

@ -36,7 +36,7 @@ class Zend_View_Helper_DocReturn extends Zend_View_Helper_Abstract
$output.= '</ul>';
} elseif (in_array($type, $this->types)) {
$output.= '<i>' . $type . '</i> ';
} elseif ($type == 'void'){
} elseif ($type == 'void') {
$output.= 'Void';
} else {
$output.= ' => <b>Type '.$type.' inconnu</b>';
@ -64,11 +64,10 @@ class Zend_View_Helper_DocReturn extends Zend_View_Helper_Abstract
private function transcodeType($type)
{
if(array_key_exists($type, $this->_transcodeType)){
if (array_key_exists($type, $this->_transcodeType)) {
return $this->_transcodeType[$type];
} else {
return $type;
}
}
}