@@ -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 | |
@@ -4,49 +4,49 @@ |
||
| 4 | 4 | |
| 5 | 5 | class MySqlProvider extends DatabaseProvider |
| 6 | 6 | {
|
| 7 | - public function connect($host, $user, $pass, $dbname){
|
|
| 7 | + public function connect($host, $user, $pass, $dbname) {
|
|
| 8 | 8 | $this->resource = new mysqli($host, $user, $pass, $dbname); |
| 9 | 9 | |
| 10 | - if ($this->resource->connect_errno){ // Connection fails
|
|
| 10 | + if ($this->resource->connect_errno) { // Connection fails
|
|
| 11 | 11 | error_log($this->resource->connect_error); |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | 14 | return $this->resource; |
| 15 | 15 | } |
| 16 | - public function disconnect(){
|
|
| 16 | + public function disconnect() {
|
|
| 17 | 17 | return $this->resource->close(); |
| 18 | 18 | } |
| 19 | - public function getErrorNo(){
|
|
| 19 | + public function getErrorNo() {
|
|
| 20 | 20 | return $this->resource->errno; |
| 21 | 21 | } |
| 22 | - public function getError(){
|
|
| 22 | + public function getError() {
|
|
| 23 | 23 | return $this->resource->error; |
| 24 | 24 | } |
| 25 | - public function query($q){
|
|
| 25 | + public function query($q) {
|
|
| 26 | 26 | return $this->resource->query($q); |
| 27 | 27 | } |
| 28 | - public function numRows($resource){
|
|
| 28 | + public function numRows($resource) {
|
|
| 29 | 29 | $num_rows = 0; |
| 30 | 30 | |
| 31 | - if ($resource){
|
|
| 31 | + if ($resource) {
|
|
| 32 | 32 | $num_rows = $resource->num_rows; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 | return $num_rows; |
| 36 | 36 | } |
| 37 | - public function fetchArray($result){
|
|
| 37 | + public function fetchArray($result) {
|
|
| 38 | 38 | return $result->fetch_assoc(); |
| 39 | 39 | } |
| 40 | - public function isConnected(){
|
|
| 40 | + public function isConnected() {
|
|
| 41 | 41 | return !is_null($this->resource); |
| 42 | 42 | } |
| 43 | - public function escape($var){
|
|
| 43 | + public function escape($var) {
|
|
| 44 | 44 | return $this->resource->real_escape_string($var); |
| 45 | 45 | } |
| 46 | - public function getInsertedID(){
|
|
| 46 | + public function getInsertedID() {
|
|
| 47 | 47 | return $this->resource->insert_id; |
| 48 | 48 | } |
| 49 | - public function changeDB ($database){
|
|
| 49 | + public function changeDB($database) {
|
|
| 50 | 50 | return $this->resource->select_db($database); |
| 51 | 51 | } |
| 52 | 52 | public function setCharset($charset) {
|
@@ -173,7 +173,7 @@ |
||
| 173 | 173 | $dialog->setHelperSet($helperSet); |
| 174 | 174 | |
| 175 | 175 | $error = 'This is not a color!'; |
| 176 | - $validator = function ($color) use ($error) { |
|
| 176 | + $validator = function($color) use ($error) { |
|
| 177 | 177 | if (!in_array($color, array('white', 'black'))) { |
| 178 | 178 | throw new \InvalidArgumentException($error); |
| 179 | 179 | } |
@@ -91,9 +91,9 @@ |
||
| 91 | 91 | define('Cf_KEY_MD5', 'P0L1'); |
| 92 | 92 | |
| 93 | 93 | /* en el controlador concatena la constante con el llamado a la funcion generarCadenaAleatoria() de Cf_PHPSeguridad */ |
| 94 | -define('Cf_CSRF_SECRET','Cfbeta'); |
|
| 94 | +define('Cf_CSRF_SECRET', 'Cfbeta'); |
|
| 95 | 95 | |
| 96 | -define('Cf_SESION_PARAMETRO_SEGURO','false'); |
|
| 96 | +define('Cf_SESION_PARAMETRO_SEGURO', 'false'); |
|
| 97 | 97 | |
| 98 | 98 | /* #base de datos */ |
| 99 | 99 | |