fixed coding standard

This commit is contained in:
Jan Schumann 2011-03-15 14:16:19 +01:00
parent bbfb1ffb53
commit c7cde09d1c
3 changed files with 6 additions and 8 deletions

View File

@ -51,12 +51,12 @@ class MysqlProfilerStorage extends PdoProfilerStorage
if ($ip = preg_replace('/[^\d\.]/', '', $ip)) {
$criteria[] = 'ip LIKE :ip';
$args[':ip'] = '%' . $ip . '%';
$args[':ip'] = '%'.$ip.'%';
}
if ($url) {
$criteria[] = 'url LIKE :url';
$args[':url'] = '%' . addcslashes($url, '%_\\') . '%';
$args[':url'] = '%'.addcslashes($url, '%_\\').'%';
}
return array($criteria, $args);

View File

@ -3,7 +3,7 @@
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@ -16,7 +16,7 @@ use Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface;
/**
* Base PDO storage for profiling information in a PDO database.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
* @author Fabien Potencier <fabien@symfony.com>
* @author Jan Schumann <js@schumann-it.com>
*/
abstract class PdoProfilerStorage implements ProfilerStorageInterface
@ -154,9 +154,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface
{
try {
$stmt = $db->prepare($query);
}
catch (\Exception $e)
{
} catch (\Exception $e) {
$stmt = false;
}

View File

@ -27,7 +27,7 @@ class SqliteProfilerStorage extends PdoProfilerStorage
{
if (is_null($this->db) || $this->db instanceof \SQLite3) {
if ('sqlite' !== substr($this->dsn, 0, 6 )) {
throw new \RuntimeException('You are trying to use Sqlite with a wrong dsn. "' . $this->dsn . '"');
throw new \RuntimeException('You are trying to use Sqlite with a wrong dsn. "'.$this->dsn.'"');
}
if (class_exists('SQLite3')) {
$db = new \SQLite3(substr($this->dsn, 7, strlen($this->dsn)), \SQLITE3_OPEN_READWRITE | \SQLITE3_OPEN_CREATE);