From aac5ae993243def7a89fa220477dda2777e7b4fa Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sun, 23 Jun 2013 01:57:48 +0200 Subject: [PATCH] typos --- composer.json | 2 +- dibi/dibi.php | 20 +++++++++++--------- examples/connecting-to-databases.php | 4 ++-- examples/database-reflection.php | 4 ++-- examples/dumping-sql-and-result-set.php | 4 ++-- examples/fetching-examples.php | 4 ++-- examples/importing-dump-from-file.php | 4 ++-- examples/nette-debug-and-exceptions.php | 4 ++-- examples/nette-debug-and-variables.php | 4 ++-- examples/query-language-and-conditions.php | 4 ++-- examples/query-language-basic-examples.php | 4 ++-- examples/result-set-data-types.php | 22 ++++++++++------------ examples/using-datetime.php | 4 ++-- examples/using-extension-methods.php | 4 ++-- examples/using-fluent-syntax.php | 4 ++-- examples/using-limit-and-offset.php | 4 ++-- examples/using-logger.php | 4 ++-- examples/using-profiler.php | 4 ++-- examples/using-substitutions.php | 4 ++-- examples/using-transactions.php | 4 ++-- 20 files changed, 56 insertions(+), 56 deletions(-) diff --git a/composer.json b/composer.json index 814badc..cbbf986 100644 --- a/composer.json +++ b/composer.json @@ -16,4 +16,4 @@ "autoload": { "classmap": ["dibi/"] } -} \ No newline at end of file +} diff --git a/dibi/dibi.php b/dibi/dibi.php index 11d90e5..953e2f3 100644 --- a/dibi/dibi.php +++ b/dibi/dibi.php @@ -631,7 +631,7 @@ class dibi } else { $sql = htmlSpecialChars($sql); $sql = preg_replace_callback($highlighter, array('dibi', 'highlightCallback'), $sql); - echo '
', trim($sql), "
\n"; + echo '
', trim($sql), "
\n\n"; } } @@ -646,34 +646,36 @@ class dibi private static function highlightCallback($matches) { - if (!empty($matches[1])) // comment + if (!empty($matches[1])) { // comment return '' . $matches[1] . ''; - if (!empty($matches[2])) // error + } elseif (!empty($matches[2])) { // error return '' . $matches[2] . ''; - if (!empty($matches[3])) // most important keywords + } elseif (!empty($matches[3])) { // most important keywords return '' . $matches[3] . ''; - if (!empty($matches[4])) // other keywords + } elseif (!empty($matches[4])) { // other keywords return '' . $matches[4] . ''; + } } private static function cliHighlightCallback($matches) { - if (!empty($matches[1])) // comment + if (!empty($matches[1])) { // comment return "\033[1;30m" . $matches[1] . "\033[0m"; - if (!empty($matches[2])) // error + } elseif (!empty($matches[2])) { // error return "\033[1;31m" . $matches[2] . "\033[0m"; - if (!empty($matches[3])) // most important keywords + } elseif (!empty($matches[3])) { // most important keywords return "\033[1;34m" . $matches[3] . "\033[0m"; - if (!empty($matches[4])) // other keywords + } elseif (!empty($matches[4])) { // other keywords return "\033[1;32m" . $matches[4] . "\033[0m"; + } } } diff --git a/examples/connecting-to-databases.php b/examples/connecting-to-databases.php index 5ff08b8..16a5c4f 100644 --- a/examples/connecting-to-databases.php +++ b/examples/connecting-to-databases.php @@ -4,8 +4,8 @@ setType('customer_id', Dibi::INTEGER) dump( $res->fetch() ); // outputs: -// object(DibiRow)#3 (3) { -// customer_id => int(1) -// name => string(11) "Dave Lister" -// added => object(DateTime53) {} -// } +// DibiRow(3) { +// customer_id => 1 +// name => "Dave Lister" (11) +// added => "2007-03-11 17:20:03" (19) @@ -40,8 +39,7 @@ $res = dibi::query('SELECT * FROM [customers]'); dump( $res->fetch() ); // outputs: -// object(DibiRow)#3 (3) { -// customer_id => int(1) -// name => string(11) "Dave Lister" -// added => string(15) "17:20 11.3.2007" -// } +// DibiRow(3) { +// customer_id => 1 +// name => "Dave Lister" (11) +// added => "2007-03-11 17:20:03" (19) diff --git a/examples/using-datetime.php b/examples/using-datetime.php index 2c02223..288df95 100644 --- a/examples/using-datetime.php +++ b/examples/using-datetime.php @@ -4,8 +4,8 @@