@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * @param $key |
|
| 86 | + * @param string $key |
|
| 87 | 87 | * |
| 88 | 88 | * @return bool |
| 89 | 89 | */ |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @param $ttl |
|
| 125 | + * @param integer $ttl |
|
| 126 | 126 | * |
| 127 | 127 | * @return int |
| 128 | 128 | */ |
@@ -78,8 +78,7 @@ |
||
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | return (\is_object(self::$registry[$key]['value'])) ? |
| 81 | - clone self::$registry[$key]['value'] : |
|
| 82 | - self::$registry[$key]['value']; |
|
| 81 | + clone self::$registry[$key]['value'] : self::$registry[$key]['value']; |
|
| 83 | 82 | } |
| 84 | 83 | |
| 85 | 84 | /** |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -include_once realpath(dirname(__FILE__)).'/../../vendor/autoload.php'; |
|
| 2 | +include_once realpath(dirname(__FILE__)) . '/../../vendor/autoload.php'; |
|
| 3 | 3 | |
| 4 | 4 | use NilPortugues\Cache\Adapter\ElasticSearchAdapter; |
| 5 | 5 | use NilPortugues\Cache\Adapter\FileSystemAdapter; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use NilPortugues\Cache\Adapter\SqliteAdapter; |
| 14 | 14 | use NilPortugues\Cache\Cache; |
| 15 | 15 | |
| 16 | -$parameters = include_once realpath(dirname(__FILE__)).'/cache_parameters.php'; |
|
| 16 | +$parameters = include_once realpath(dirname(__FILE__)) . '/cache_parameters.php'; |
|
| 17 | 17 | |
| 18 | 18 | /****************************************************** |
| 19 | 19 | * Caching in system memory or disk |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/6/15 |
|
| 5 | - * Time: 6:31 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/6/15 |
|
| 5 | + * Time: 6:31 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\Memcached; |
| 12 | 12 | |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/6/15 |
|
| 5 | - * Time: 10:29 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/6/15 |
|
| 5 | + * Time: 10:29 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\Memcached; |
| 12 | 12 | |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | ) |
| 62 | 62 | ); |
| 63 | 63 | |
| 64 | - $sphinxId = (int) $this->connection->lastInsertId()+1; |
|
| 64 | + $sphinxId = (int)$this->connection->lastInsertId() + 1; |
|
| 65 | 65 | |
| 66 | 66 | $stmt->bindParam(self::SPHINX_ID_PLACEHOLDER, $sphinxId, PDO::PARAM_STR); |
| 67 | 67 | $stmt->bindParam(self::QUERY_ID_PLACEHOLDER, $key, PDO::PARAM_STR); |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/5/15 |
|
| 5 | - * Time: 12:32 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/5/15 |
|
| 5 | + * Time: 12:32 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\SQL\Connection; |
| 12 | 12 | |
@@ -36,6 +36,6 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | protected function buildDSNString(array &$parameters) |
| 38 | 38 | { |
| 39 | - return \str_replace(self::PATH."=", '', parent::buildDSNString($parameters)); |
|
| 39 | + return \str_replace(self::PATH . "=", '', parent::buildDSNString($parameters)); |
|
| 40 | 40 | } |
| 41 | 41 | } |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/5/15 |
|
| 5 | - * Time: 12:20 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/5/15 |
|
| 5 | + * Time: 12:20 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\SQL\Connection; |
| 12 | 12 | |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | |
| 78 | 78 | try { |
| 79 | 79 | $dsn = $this->buildDSNString($parameters[self::DATABASE]); |
| 80 | - $this->connection = new PDO($this->dsn.$dsn, $username, $password, $driverOptions); |
|
| 80 | + $this->connection = new PDO($this->dsn . $dsn, $username, $password, $driverOptions); |
|
| 81 | 81 | $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
| 82 | 82 | } catch (PDOException $e) { |
| 83 | 83 | throw new InvalidArgumentException( |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/5/15 |
|
| 5 | - * Time: 12:29 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/5/15 |
|
| 5 | + * Time: 12:29 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\SQL\Connection; |
| 12 | 12 | |
@@ -1,12 +1,12 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | - * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | - * Date: 4/5/15 |
|
| 5 | - * Time: 12:31 PM |
|
| 6 | - * |
|
| 7 | - * For the full copyright and license information, please view the LICENSE |
|
| 8 | - * file that was distributed with this source code. |
|
| 9 | - */ |
|
| 3 | + * Author: Nil Portugués Calderó <[email protected]> |
|
| 4 | + * Date: 4/5/15 |
|
| 5 | + * Time: 12:31 PM |
|
| 6 | + * |
|
| 7 | + * For the full copyright and license information, please view the LICENSE |
|
| 8 | + * file that was distributed with this source code. |
|
| 9 | + */ |
|
| 10 | 10 | |
| 11 | 11 | namespace NilPortugues\Cache\Adapter\SQL\Connection; |
| 12 | 12 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | protected function buildDSNString(array &$parameters) |
| 36 | 36 | { |
| 37 | 37 | if (\array_key_exists(self::UNIX_SOCKET, $parameters)) { |
| 38 | - return self::UNIX_SOCKET."=".$parameters[self::UNIX_SOCKET]; |
|
| 38 | + return self::UNIX_SOCKET . "=" . $parameters[self::UNIX_SOCKET]; |
|
| 39 | 39 | } |
| 40 | 40 | return parent::buildDSNString($parameters); |
| 41 | 41 | } |