@@ -26,7 +26,7 @@ |
||
26 | 26 | $this->application->setAutoExit(false); |
27 | 27 | $this->application->register('foo') |
28 | 28 | ->addArgument('foo') |
29 | - ->setCode(function ($input, $output) { $output->writeln('foo'); }) |
|
29 | + ->setCode(function($input, $output) { $output->writeln('foo'); }) |
|
30 | 30 | ; |
31 | 31 | |
32 | 32 | $this->tester = new ApplicationTester($this->application); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $this->command = new Command('foo'); |
27 | 27 | $this->command->addArgument('command'); |
28 | 28 | $this->command->addArgument('foo'); |
29 | - $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); |
|
29 | + $this->command->setCode(function($input, $output) { $output->writeln('foo'); }); |
|
30 | 30 | |
31 | 31 | $this->tester = new CommandTester($this->command); |
32 | 32 | $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $application->setAutoExit(false); |
73 | 73 | |
74 | 74 | $command = new Command('foo'); |
75 | - $command->setCode(function ($input, $output) { $output->writeln('foo'); }); |
|
75 | + $command->setCode(function($input, $output) { $output->writeln('foo'); }); |
|
76 | 76 | |
77 | 77 | $application->add($command); |
78 | 78 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | $output = $this->getOutputStream(StreamOutput::VERBOSITY_NORMAL); |
40 | 40 | |
41 | 41 | $executed = false; |
42 | - $callback = function () use (&$executed) { $executed = true; }; |
|
42 | + $callback = function() use (&$executed) { $executed = true; }; |
|
43 | 43 | |
44 | 44 | $helper->run($output, 'php -r "echo 42;"', null, $callback); |
45 | 45 | $this->assertTrue($executed); |
@@ -65,7 +65,7 @@ |
||
65 | 65 | array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), |
66 | 66 | array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), |
67 | 67 | array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), |
68 | - array("'a'\r'b'\n'c'\t'd'", array('a','b','c','d'), '->tokenize() parses whitespace chars between args as spaces'), |
|
68 | + array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), |
|
69 | 69 | array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), |
70 | 70 | array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), |
71 | 71 | array('-a', array('-a'), '->tokenize() parses short options'), |
@@ -336,7 +336,7 @@ |
||
336 | 336 | public function __toString() |
337 | 337 | { |
338 | 338 | $self = $this; |
339 | - $tokens = array_map(function ($token) use ($self) { |
|
339 | + $tokens = array_map(function($token) use ($self) { |
|
340 | 340 | if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { |
341 | 341 | return $match[1].$self->escapeToken($match[2]); |
342 | 342 | } |
@@ -87,9 +87,9 @@ |
||
87 | 87 | |
88 | 88 | //valido que no este creada la sesion ò cookie de lang |
89 | 89 | if(!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])){ |
90 | - // register the session and set the cookie |
|
91 | - $_SESSION['lang'] = $lang; |
|
92 | - setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
|
90 | + // register the session and set the cookie |
|
91 | + $_SESSION['lang'] = $lang; |
|
92 | + setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | $lang_file = 'lang.'.$lang.'.php'; |
@@ -42,37 +42,37 @@ discard block |
||
42 | 42 | /** Cf directorio separador */ |
43 | 43 | defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); |
44 | 44 | /** Cf raiz del sitio */ |
45 | -defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__)).DS); |
|
45 | +defined('SITE_ROOT') ? null : define('SITE_ROOT', realpath(dirname(__FILE__)).DS); |
|
46 | 46 | /** Cf PATH del sitio */ |
47 | -defined('SITE_PATH') ? NULL : define ('SITE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS) . DS); |
|
47 | +defined('SITE_PATH') ? NULL : define('SITE_PATH', realpath(dirname(__FILE__).DS.'..'.DS).DS); |
|
48 | 48 | |
49 | 49 | /** Cf definimos constante Ruta directa al nucleo de framework */ |
50 | -define('RUTA_NUCLEO', SITE_ROOT . 'Sistema'.DS.'Nucleo' . DS); |
|
50 | +define('RUTA_NUCLEO', SITE_ROOT.'Sistema'.DS.'Nucleo'.DS); |
|
51 | 51 | |
52 | 52 | # define para mvc erp |
53 | 53 | |
54 | 54 | /** Cf definimos constante directa a la vista del framework */ |
55 | -define('VIEW_PATH', SITE_ROOT . 'mvc'.DS.'vistas' . DS); |
|
55 | +define('VIEW_PATH', SITE_ROOT.'mvc'.DS.'vistas'.DS); |
|
56 | 56 | /** Cf definimos constante directa a los controladores del framework */ |
57 | -define('CONTR_PATH', SITE_ROOT . 'mvc'.DS.'controladores' . DS); |
|
57 | +define('CONTR_PATH', SITE_ROOT.'mvc'.DS.'controladores'.DS); |
|
58 | 58 | /** Cf definimos constante directa a los modelos del framework */ |
59 | -define('RUTA_MOD', SITE_ROOT . 'mvc'.DS.'modelos' . DS); |
|
59 | +define('RUTA_MOD', SITE_ROOT.'mvc'.DS.'modelos'.DS); |
|
60 | 60 | |
61 | 61 | # define ruta a los stilos del public |
62 | 62 | |
63 | 63 | /** Cf definimos constante directa a los css dentro del directorio public_ del framework */ |
64 | -define('CSS_PATH', SITE_ROOT . 'public_'.DS.'css' . DS); |
|
64 | +define('CSS_PATH', SITE_ROOT.'public_'.DS.'css'.DS); |
|
65 | 65 | /** Cf definimos constante directa a los css dentro del directorio public_ del framework */ |
66 | -define('IMG_PATH', SITE_ROOT . 'public_'.DS.'img' . DS); |
|
66 | +define('IMG_PATH', SITE_ROOT.'public_'.DS.'img'.DS); |
|
67 | 67 | /** Cf definimos constante directa a los js dentro del directorio public_ del framework */ |
68 | -define('JS_PATH', SITE_ROOT . 'public_'.DS.'js' . DS); |
|
68 | +define('JS_PATH', SITE_ROOT.'public_'.DS.'js'.DS); |
|
69 | 69 | /** Cf definimos constante directa a las librerias dentro del framework */ |
70 | -define('RUTA_LIBS', SITE_ROOT . 'Sistema'.DS.'librerias' . DS); |
|
70 | +define('RUTA_LIBS', SITE_ROOT.'Sistema'.DS.'librerias'.DS); |
|
71 | 71 | /** Cf definimos constante directa a los ayudantes del framework */ |
72 | -define('RUTA_AYUDANTES', SITE_ROOT . 'Sistema'.DS.'ayudantes' . DS); |
|
72 | +define('RUTA_AYUDANTES', SITE_ROOT.'Sistema'.DS.'ayudantes'.DS); |
|
73 | 73 | |
74 | 74 | /** Cf definimos constante directa a los lenguajes del framework */ |
75 | -define('RUTA_LENGUAJES', SITE_ROOT . 'Sistema'.DS.'lenguajes' . DS); |
|
75 | +define('RUTA_LENGUAJES', SITE_ROOT.'Sistema'.DS.'lenguajes'.DS); |
|
76 | 76 | |
77 | 77 | |
78 | 78 | //LENGUAJES |
@@ -80,13 +80,13 @@ discard block |
||
80 | 80 | //luego por get capturamos la variable lan al inicio de la aplicacion asi: www.tuapp.com/?lang=de |
81 | 81 | |
82 | 82 | $lang = 'es'; // por defecto el idioma para el app es español puede ser en, bt, de, zh |
83 | -if(isSet($_GET['lang'])){ |
|
83 | +if (isSet($_GET['lang'])) { |
|
84 | 84 | $lang = $_GET['lang']; |
85 | 85 | } |
86 | 86 | //en caso de no cumplir la condicion el $lang va ser "es" |
87 | 87 | |
88 | 88 | //valido que no este creada la sesion ò cookie de lang |
89 | -if(!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])){ |
|
89 | +if (!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])) { |
|
90 | 90 | // register the session and set the cookie |
91 | 91 | $_SESSION['lang'] = $lang; |
92 | 92 | setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | |
95 | 95 | $lang_file = 'lang.'.$lang.'.php'; |
96 | 96 | |
97 | -include_once RUTA_LENGUAJES . $lang_file; |
|
97 | +include_once RUTA_LENGUAJES.$lang_file; |
|
98 | 98 | |
99 | 99 | //FIN LENGUAJES |
100 | 100 | |
@@ -109,9 +109,9 @@ discard block |
||
109 | 109 | |
110 | 110 | # Cargamos la autocarga dinamica y configuraciones |
111 | 111 | //require_once RUTA_NUCLEO . 'Cf_Autocarga.php'; |
112 | -require_once RUTA_NUCLEO . 'CFConfiguracion.php'; |
|
112 | +require_once RUTA_NUCLEO.'CFConfiguracion.php'; |
|
113 | 113 | |
114 | -try{ |
|
114 | +try { |
|
115 | 115 | |
116 | 116 | Nucleo\CFBootstrap::actuar(new Nucleo\CFSolicitud); |
117 | 117 | //CFBootstrap::actuar(new CFSolicitud); |