@@ -284,7 +284,7 @@ |
||
| 284 | 284 | $this->assertEquals('-f foo', (string) $input); |
| 285 | 285 | |
| 286 | 286 | $input = new ArgvInput(array('cli.php', '-f', '--bar=foo', 'a b c d', "A\nB'C")); |
| 287 | - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); |
|
| 287 | + $this->assertEquals('-f --bar=foo ' . escapeshellarg('a b c d') . ' ' . escapeshellarg("A\nB'C"), (string) $input); |
|
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
@@ -133,6 +133,6 @@ |
||
| 133 | 133 | public function testToString() |
| 134 | 134 | { |
| 135 | 135 | $input = new ArrayInput(array('-f' => null, '-b' => 'bar', '--foo' => 'b a z', '--lala' => null, 'test' => 'Foo', 'test2' => "A\nB'C")); |
| 136 | - $this->assertEquals('-f -b=bar --foo='.escapeshellarg('b a z').' --lala Foo '.escapeshellarg("A\nB'C"), (string) $input); |
|
| 136 | + $this->assertEquals('-f -b=bar --foo=' . escapeshellarg('b a z') . ' --lala Foo ' . escapeshellarg("A\nB'C"), (string) $input); |
|
| 137 | 137 | } |
| 138 | 138 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | public static function setUpBeforeClass() |
| 25 | 25 | { |
| 26 | - self::$fixtures = __DIR__.'/../Fixtures/'; |
|
| 26 | + self::$fixtures = __DIR__ . '/../Fixtures/'; |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | public function testConstructorArguments() |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | new InputOption('qux', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux option', array('http://foo.com/', 'bar')), |
| 391 | 391 | new InputOption('qux2', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux2 option', array('foo' => 'bar')), |
| 392 | 392 | )); |
| 393 | - $this->assertStringEqualsFile(self::$fixtures.'/definition_astext.txt', $definition->asText(), '->asText() returns a textual representation of the InputDefinition'); |
|
| 393 | + $this->assertStringEqualsFile(self::$fixtures . '/definition_astext.txt', $definition->asText(), '->asText() returns a textual representation of the InputDefinition'); |
|
| 394 | 394 | } |
| 395 | 395 | |
| 396 | 396 | /** |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | new InputOption('baz', null, InputOption::VALUE_OPTIONAL, 'The baz option', false), |
| 409 | 409 | new InputOption('bar', 'b', InputOption::VALUE_OPTIONAL, 'The bar option', 'bar'), |
| 410 | 410 | )); |
| 411 | - $this->assertXmlStringEqualsXmlFile(self::$fixtures.'/definition_asxml.txt', $definition->asXml(), '->asXml() returns an XML representation of the InputDefinition'); |
|
| 411 | + $this->assertXmlStringEqualsXmlFile(self::$fixtures . '/definition_asxml.txt', $definition->asXml(), '->asXml() returns an XML representation of the InputDefinition'); |
|
| 412 | 412 | } |
| 413 | 413 | |
| 414 | 414 | protected function initializeArguments() |
@@ -65,7 +65,7 @@ discard block |
||
| 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'), |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | $this->assertEquals('-f foo', (string) $input); |
| 94 | 94 | |
| 95 | 95 | $input = new StringInput('-f --bar=foo "a b c d"'); |
| 96 | - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d'), (string) $input); |
|
| 96 | + $this->assertEquals('-f --bar=foo ' . escapeshellarg('a b c d'), (string) $input); |
|
| 97 | 97 | |
| 98 | - $input = new StringInput('-f --bar=foo \'a b c d\' '."'A\nB\\'C'"); |
|
| 99 | - $this->assertEquals('-f --bar=foo '.escapeshellarg('a b c d').' '.escapeshellarg("A\nB'C"), (string) $input); |
|
| 98 | + $input = new StringInput('-f --bar=foo \'a b c d\' ' . "'A\nB\\'C'"); |
|
| 99 | + $this->assertEquals('-f --bar=foo ' . escapeshellarg('a b c d') . ' ' . escapeshellarg("A\nB'C"), (string) $input); |
|
| 100 | 100 | } |
| 101 | 101 | } |
@@ -151,6 +151,6 @@ |
||
| 151 | 151 | |
| 152 | 152 | protected function doWrite($message, $newline) |
| 153 | 153 | { |
| 154 | - $this->output .= $message.($newline ? "\n" : ''); |
|
| 154 | + $this->output .= $message . ($newline ? "\n" : ''); |
|
| 155 | 155 | } |
| 156 | 156 | } |
@@ -55,6 +55,6 @@ |
||
| 55 | 55 | $output = new StreamOutput($this->stream); |
| 56 | 56 | $output->writeln('foo'); |
| 57 | 57 | rewind($output->getStream()); |
| 58 | - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); |
|
| 58 | + $this->assertEquals('foo' . PHP_EOL, stream_get_contents($output->getStream()), '->doWrite() writes to the stream'); |
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 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); |
@@ -54,12 +54,12 @@ discard block |
||
| 54 | 54 | public function testGetOutput() |
| 55 | 55 | { |
| 56 | 56 | rewind($this->tester->getOutput()->getStream()); |
| 57 | - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); |
|
| 57 | + $this->assertEquals('foo' . PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | public function testGetDisplay() |
| 61 | 61 | { |
| 62 | - $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); |
|
| 62 | + $this->assertEquals('foo' . PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | public function testGetStatusCode() |
@@ -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)); |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | public function testGetOutput() |
| 54 | 54 | { |
| 55 | 55 | rewind($this->tester->getOutput()->getStream()); |
| 56 | - $this->assertEquals('foo'.PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); |
|
| 56 | + $this->assertEquals('foo' . PHP_EOL, stream_get_contents($this->tester->getOutput()->getStream()), '->getOutput() returns the current output instance'); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | public function testGetDisplay() |
| 60 | 60 | { |
| 61 | - $this->assertEquals('foo'.PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); |
|
| 61 | + $this->assertEquals('foo' . PHP_EOL, $this->tester->getDisplay(), '->getDisplay() returns the display of the last execution'); |
|
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | public function testGetStatusCode() |
@@ -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 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | //verificamos la version de php en tu servidor web o local |
| 28 | 28 | if (version_compare(PHP_VERSION, '5.3.20', '<')) |
| 29 | 29 | { |
| 30 | - die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION); |
|
| 30 | + die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | //Cargamos los Espacios de nombres para el nucleo y los ayudantes |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $this->_ayuda= new Sisayu\CFPHPAyuda; |
| 50 | 50 | //$this->cargaAyudante('CfPHPAyuda'); |
| 51 | - //$this->cargaAyudante('CfPHPSeguridad'); |
|
| 51 | + //$this->cargaAyudante('CfPHPSeguridad'); |
|
| 52 | 52 | $this->_seg= new Sisayu\CfPHPSeguridad; |
| 53 | 53 | |
| 54 | 54 | $this->_sesion=new Sisnuc\CFSesion(); |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | //verificamos la version de php en tu servidor web o local |
| 28 | 28 | if (version_compare(PHP_VERSION, '5.3.20', '<')) |
| 29 | 29 | { |
| 30 | - die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION); |
|
| 30 | + die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: ' . PHP_VERSION); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | //Cargamos los Espacios de nombres para el nucleo y los ayudantes |
@@ -46,12 +46,12 @@ discard block |
||
| 46 | 46 | public function __construct() { |
| 47 | 47 | parent::__construct(); |
| 48 | 48 | |
| 49 | - $this->_ayuda= new Sisayu\CFPHPAyuda; |
|
| 49 | + $this->_ayuda = new Sisayu\CFPHPAyuda; |
|
| 50 | 50 | //$this->cargaAyudante('CfPHPAyuda'); |
| 51 | 51 | //$this->cargaAyudante('CfPHPSeguridad'); |
| 52 | - $this->_seg= new Sisayu\CfPHPSeguridad; |
|
| 52 | + $this->_seg = new Sisayu\CfPHPSeguridad; |
|
| 53 | 53 | |
| 54 | - $this->_sesion=new Sisnuc\CFSesion(); |
|
| 54 | + $this->_sesion = new Sisnuc\CFSesion(); |
|
| 55 | 55 | |
| 56 | 56 | } |
| 57 | 57 | |
@@ -59,16 +59,16 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | // Se verifica que en el archivo de configuracion.php la constante Cf_CONFIG_INICIO==true |
| 61 | 61 | //Si esta en True se lanza el instalador de Cf |
| 62 | - if(Cf_CONFIG_INICIO==true){ |
|
| 62 | + if (Cf_CONFIG_INICIO == true) { |
|
| 63 | 63 | $this->_sesion->iniciarSesion('_s', false); |
| 64 | - if($_SESSION['nivel']==1){ |
|
| 64 | + if ($_SESSION['nivel'] == 1) { |
|
| 65 | 65 | $this->_vista->titulo = 'CalimaFramework'; |
| 66 | 66 | $this->_vista->imprimirVista('index', 'data'); |
| 67 | - }else{ |
|
| 67 | + } else { |
|
| 68 | 68 | $this->_ayuda->redireccionUrl('usuario'); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - }elseif (Cf_CONFIG_INICIO=='false') { |
|
| 71 | + }elseif (Cf_CONFIG_INICIO == 'false') { |
|
| 72 | 72 | |
| 73 | 73 | $this->_vista->titulo = 'CalimaFramework'; |
| 74 | 74 | $this->_vista->imprimirVista('index', 'data'); |
@@ -64,11 +64,11 @@ |
||
| 64 | 64 | if($_SESSION['nivel']==1){ |
| 65 | 65 | $this->_vista->titulo = 'CalimaFramework'; |
| 66 | 66 | $this->_vista->imprimirVista('index', 'data'); |
| 67 | - }else{ |
|
| 67 | + } else{ |
|
| 68 | 68 | $this->_ayuda->redireccionUrl('usuario'); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - }elseif (Cf_CONFIG_INICIO=='false') { |
|
| 71 | + } elseif (Cf_CONFIG_INICIO=='false') { |
|
| 72 | 72 | |
| 73 | 73 | $this->_vista->titulo = 'CalimaFramework'; |
| 74 | 74 | $this->_vista->imprimirVista('index', 'data'); |