fixed coding standard
This commit is contained in:
parent
bbfb1ffb53
commit
c7cde09d1c
4
src/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php
Executable file → Normal file
4
src/Symfony/Component/HttpKernel/Profiler/MysqlProfilerStorage.php
Executable file → Normal file
@ -51,12 +51,12 @@ class MysqlProfilerStorage extends PdoProfilerStorage
|
|||||||
|
|
||||||
if ($ip = preg_replace('/[^\d\.]/', '', $ip)) {
|
if ($ip = preg_replace('/[^\d\.]/', '', $ip)) {
|
||||||
$criteria[] = 'ip LIKE :ip';
|
$criteria[] = 'ip LIKE :ip';
|
||||||
$args[':ip'] = '%' . $ip . '%';
|
$args[':ip'] = '%'.$ip.'%';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($url) {
|
if ($url) {
|
||||||
$criteria[] = 'url LIKE :url';
|
$criteria[] = 'url LIKE :url';
|
||||||
$args[':url'] = '%' . addcslashes($url, '%_\\') . '%';
|
$args[':url'] = '%'.addcslashes($url, '%_\\').'%';
|
||||||
}
|
}
|
||||||
|
|
||||||
return array($criteria, $args);
|
return array($criteria, $args);
|
||||||
|
8
src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Executable file → Normal file
8
src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Executable file → Normal file
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file is part of the Symfony package.
|
* 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
|
* For the full copyright and license information, please view the LICENSE
|
||||||
* file that was distributed with this source code.
|
* 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.
|
* 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>
|
* @author Jan Schumann <js@schumann-it.com>
|
||||||
*/
|
*/
|
||||||
abstract class PdoProfilerStorage implements ProfilerStorageInterface
|
abstract class PdoProfilerStorage implements ProfilerStorageInterface
|
||||||
@ -154,9 +154,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$stmt = $db->prepare($query);
|
$stmt = $db->prepare($query);
|
||||||
}
|
} catch (\Exception $e) {
|
||||||
catch (\Exception $e)
|
|
||||||
{
|
|
||||||
$stmt = false;
|
$stmt = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php
Executable file → Normal file
2
src/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php
Executable file → Normal file
@ -27,7 +27,7 @@ class SqliteProfilerStorage extends PdoProfilerStorage
|
|||||||
{
|
{
|
||||||
if (is_null($this->db) || $this->db instanceof \SQLite3) {
|
if (is_null($this->db) || $this->db instanceof \SQLite3) {
|
||||||
if ('sqlite' !== substr($this->dsn, 0, 6 )) {
|
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')) {
|
if (class_exists('SQLite3')) {
|
||||||
$db = new \SQLite3(substr($this->dsn, 7, strlen($this->dsn)), \SQLITE3_OPEN_READWRITE | \SQLITE3_OPEN_CREATE);
|
$db = new \SQLite3(substr($this->dsn, 7, strlen($this->dsn)), \SQLITE3_OPEN_READWRITE | \SQLITE3_OPEN_CREATE);
|
||||||
|
Reference in New Issue
Block a user