Skip to content

Commit b30c326

Browse files
committed
Merge pull request PHPIDS#36 from KingCrunch/cleaning
Some cleanup
2 parents e45a9cd + 9810c6e commit b30c326

25 files changed

+272
-486
lines changed

lib/IDS/Caching/ApcCache.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,3 @@ public function getCache()
142142
return $data;
143143
}
144144
}
145-
146-
/**
147-
* Local variables:
148-
* tab-width: 4
149-
* c-basic-offset: 4
150-
* End:
151-
* vim600: sw=4 ts=4 expandtab
152-
*/

lib/IDS/Caching/CacheFactory.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -30,6 +29,7 @@
3029
* @license http://www.gnu.org/licenses/lgpl.html LGPL
3130
* @link http://php-ids.org/
3231
*/
32+
namespace IDS\Caching;
3333

3434
/**
3535
* Caching factory
@@ -47,9 +47,6 @@
4747
* @link http://php-ids.org/
4848
* @since Version 0.4
4949
*/
50-
51-
namespace IDS\Caching;
52-
5350
class CacheFactory
5451
{
5552
/**
@@ -86,11 +83,3 @@ public static function factory($init, $type)
8683
return $object;
8784
}
8885
}
89-
90-
/**
91-
* Local variables:
92-
* tab-width: 4
93-
* c-basic-offset: 4
94-
* End:
95-
* vim600: sw=4 ts=4 expandtab
96-
*/

lib/IDS/Caching/CacheInterface.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -30,6 +29,7 @@
3029
* @license http://www.gnu.org/licenses/lgpl.html LGPL
3130
* @link http://php-ids.org/
3231
*/
32+
namespace IDS\Caching;
3333

3434
/**
3535
* Caching wrapper interface
@@ -44,9 +44,6 @@
4444
* @since Version 0.4
4545
* @link http://php-ids.org/
4646
*/
47-
48-
namespace IDS\Caching;
49-
5047
interface CacheInterface
5148
{
5249
/**
@@ -65,11 +62,3 @@ public function setCache(array $data);
6562
*/
6663
public function getCache();
6764
}
68-
69-
/**
70-
* Local variables:
71-
* tab-width: 4
72-
* c-basic-offset: 4
73-
* End:
74-
* vim600: sw=4 ts=4 expandtab
75-
*/

lib/IDS/Caching/DatabaseCache.php

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -30,31 +29,34 @@
3029
* @license http://www.gnu.org/licenses/lgpl.html LGPL
3130
* @link http://php-ids.org/
3231
*/
32+
namespace IDS\Caching;
3333

3434
/**
35-
* Needed SQL:
3635
*
37-
38-
#create the database
39-
40-
CREATE DATABASE IF NOT EXISTS `phpids` DEFAULT CHARACTER
41-
SET utf8 COLLATE utf8_general_ci;
42-
DROP TABLE IF EXISTS `cache`;
43-
44-
#now select the created datbase and create the table
45-
46-
CREATE TABLE `cache` (
47-
`type` VARCHAR( 32 ) NOT null ,
48-
`data` TEXT NOT null ,
49-
`created` DATETIME NOT null ,
50-
`modified` DATETIME NOT null
51-
) ENGINE = MYISAM ;
5236
*/
5337

5438
/**
5539
* Database caching wrapper
5640
*
5741
* This class inhabits functionality to get and set cache via a database.
42+
*
43+
* Needed SQL:
44+
*
45+
46+
#create the database
47+
48+
CREATE DATABASE IF NOT EXISTS `phpids` DEFAULT CHARACTER
49+
SET utf8 COLLATE utf8_general_ci;
50+
DROP TABLE IF EXISTS `cache`;
51+
52+
#now select the created datbase and create the table
53+
54+
CREATE TABLE `cache` (
55+
`type` VARCHAR( 32 ) NOT null ,
56+
`data` TEXT NOT null ,
57+
`created` DATETIME NOT null ,
58+
`modified` DATETIME NOT null
59+
) ENGINE = MYISAM ;
5860
*
5961
* @category Security
6062
* @package PHPIDS
@@ -66,9 +68,6 @@
6668
* @link http://php-ids.org/
6769
* @since Version 0.4
6870
*/
69-
70-
namespace IDS\Caching;
71-
7271
class DatabaseCache implements CacheInterface
7372
{
7473

@@ -276,11 +275,3 @@ private function write($handle, $data)
276275
}
277276
}
278277
}
279-
280-
/**
281-
* Local variables:
282-
* tab-width: 4
283-
* c-basic-offset: 4
284-
* End:
285-
* vim600: sw=4 ts=4 expandtab
286-
*/

lib/IDS/Caching/FileCache.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -30,7 +29,6 @@
3029
* @license http://www.gnu.org/licenses/lgpl.html LGPL
3130
* @link http://php-ids.org/
3231
*/
33-
3432
namespace IDS\Caching;
3533

3634
use IDS\Init;
@@ -52,7 +50,6 @@
5250
*/
5351
class FileCache implements CacheInterface
5452
{
55-
5653
/**
5754
* Caching type
5855
*
@@ -190,11 +187,3 @@ private function isValidFile($file)
190187
return file_exists($file) && time() - filectime($file) <= $this->config['expiration_time'];
191188
}
192189
}
193-
194-
/**
195-
* Local variables:
196-
* tab-width: 4
197-
* c-basic-offset: 4
198-
* End:
199-
* vim600: sw=4 ts=4 expandtab
200-
*/

lib/IDS/Caching/MemcachedCache.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -30,7 +29,6 @@
3029
* @license http://www.gnu.org/licenses/lgpl.html LGPL
3130
* @link http://php-ids.org/
3231
*/
33-
3432
namespace IDS\Caching;
3533

3634
/**
@@ -181,11 +179,3 @@ private function connect()
181179
}
182180
}
183181
}
184-
185-
/**
186-
* Local variables:
187-
* tab-width: 4
188-
* c-basic-offset: 4
189-
* End:
190-
* vim600: sw=4 ts=4 expandtab
191-
*/

lib/IDS/Caching/SessionCache.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
/**
43
* PHPIDS
54
*
@@ -50,7 +49,6 @@
5049
*/
5150
class SessionCache implements CacheInterface
5251
{
53-
5452
/**
5553
* Caching type
5654
*
@@ -136,11 +134,3 @@ public function getCache()
136134
return false;
137135
}
138136
}
139-
140-
/**
141-
* Local variables:
142-
* tab-width: 4
143-
* c-basic-offset: 4
144-
* End:
145-
* vim600: sw=4 ts=4 expandtab
146-
*/

0 commit comments

Comments
 (0)