Skip to content
Permalink
Browse files

Removing @access and @static where they are not needed anymore.

  • Loading branch information...
markstory committed Jul 6, 2010
1 parent 09e04c5 commit 5d8e27d97be70d40c71e1afd287f9e7835b0cff9
Showing with 1 addition and 47 deletions.
  1. +1 −9 cake/libs/cake_log.php
  2. +0 −18 cake/libs/sanitize.php
  3. +0 −13 cake/libs/security.php
  4. +0 −7 cake/libs/string.php
@@ -70,7 +70,6 @@ class CakeLog {
* Each stream represents a callable that will be called when write() is called.
*
* @var array
* @access protected
*/
protected static $_streams = array();
@@ -99,9 +98,8 @@ class CakeLog {
* @param array $config Array of configuration information for the logger
* @return boolean success of configuration.
* @throws Exception
* @static
*/
function config($key, $config) {
static function config($key, $config) {
if (empty($config['engine'])) {
throw new Exception(__('Missing logger classname'));
}
@@ -145,8 +143,6 @@ protected static function _getLogger($loggerName) {
* Returns the keynames of the currently active streams
*
* @return array Array of configured log streams.
* @access public
* @static
*/
public static function configured() {
return array_keys(self::$_streams);
@@ -158,8 +154,6 @@ public static function configured() {
*
* @param string $keyname Key name of a configured stream to remove.
* @return void
* @access public
* @static
*/
public static function drop($streamName) {
unset(self::$_streams[$streamName]);
@@ -200,8 +194,6 @@ protected static function _autoConfig() {
* @param string $type Type of message being written
* @param string $message Message content to log
* @return boolean Success
* @access public
* @static
*/
public static function write($type, $message) {
if (!defined('LOG_ERROR')) {
@@ -37,8 +37,6 @@ class Sanitize {
* @param string $string String to sanitize
* @param array $allowed An array of additional characters that are not to be removed.
* @return string Sanitized string
* @access public
* @static
*/
public static function paranoid($string, $allowed = array()) {
$allow = null;
@@ -65,8 +63,6 @@ public static function paranoid($string, $allowed = array()) {
* @param string $string String to sanitize
* @param string $connection Database connection being used
* @return string SQL safe string
* @access public
* @static
*/
public static function escape($string, $connection = 'default') {
$db =& ConnectionManager::getDataSource($connection);
@@ -93,8 +89,6 @@ public static function escape($string, $connection = 'default') {
* @param string $string String from where to strip tags
* @param array $options Array of options to use.
* @return string Sanitized string
* @access public
* @static
*/
public static function html($string, $options = array()) {
static $defaultCharset = false;
@@ -124,8 +118,6 @@ public static function html($string, $options = array()) {
*
* @param string $str String to sanitize
* @return string whitespace sanitized string
* @access public
* @static
*/
public static function stripWhitespace($str) {
$r = preg_replace('/[\n\r\t]+/', '', $str);
@@ -137,8 +129,6 @@ public static function stripWhitespace($str) {
*
* @param string $str String to sanitize
* @return string Sting with images stripped.
* @access public
* @static
*/
public static function stripImages($str) {
$str = preg_replace('/(<a[^>]*>)(<img[^>]+alt=")([^"]*)("[^>]*>)(<\/a>)/i', '$1$3$5<br />', $str);
@@ -152,8 +142,6 @@ public static function stripImages($str) {
*
* @param string $str String to sanitize
* @return string String with <script>, <style>, <link> elements removed.
* @access public
* @static
*/
public static function stripScripts($str) {
return preg_replace('/(<link[^>]+rel="[^"]*stylesheet"[^>]*>|<img[^>]*>|style="[^"]*")|<script[^>]*>.*?<\/script>|<style[^>]*>.*?<\/style>|<!--.*?-->/is', '', $str);
@@ -183,8 +171,6 @@ public static function stripAll($str) {
* @param string $str String to sanitize
* @param string $tag Tag to remove (add more parameters as needed)
* @return string sanitized String
* @access public
* @static
*/
public static function stripTags() {
$params = func_get_args();
@@ -214,8 +200,6 @@ public static function stripTags() {
* @param mixed $data Data to sanitize
* @param mixed $options If string, DB connection being used, otherwise set of options
* @return mixed Sanitized data
* @access public
* @static
*/
public static function clean($data, $options = array()) {
if (empty($data)) {
@@ -278,8 +262,6 @@ public static function clean($data, $options = array()) {
* Formats column data from definition in DBO's $columns array
*
* @param Model $model The model containing the data to be formatted
* @access public
* @static
*/
public static function formatColumns(&$model) {
foreach ($model->data as $name => $values) {
@@ -30,16 +30,13 @@ class Security {
* Default hash method
*
* @var string
* @access public
*/
public static $hashType = null;
/**
* Get allowed minutes of inactivity based on security level.
*
* @return integer Allowed inactivity in minutes
* @access public
* @static
*/
public static function inactiveMins() {
switch (Configure::read('Security.level')) {
@@ -60,8 +57,6 @@ public static function inactiveMins() {
* Generate authorization hash.
*
* @return string Hash
* @access public
* @static
*/
public static function generateAuthKey() {
if (!class_exists('String')) {
@@ -75,8 +70,6 @@ public static function generateAuthKey() {
*
* @param string $authKey Authorization hash
* @return boolean Success
* @access public
* @static
* @todo Complete implementation
*/
function validateAuthKey($authKey) {
@@ -92,8 +85,6 @@ function validateAuthKey($authKey) {
* @param boolean $salt If true, automatically appends the application's salt
* value to $string (Security.salt)
* @return string Hash
* @access public
* @static
*/
public static function hash($string, $type = null, $salt = false) {
if ($salt) {
@@ -132,9 +123,7 @@ public static function hash($string, $type = null, $salt = false) {
* Security::hash().
*
* @param string $hash Method to use (sha1/sha256/md5)
* @access public
* @return void
* @static
* @see Security::hash()
*/
public static function setHash($hash) {
@@ -147,8 +136,6 @@ public static function setHash($hash) {
* @param string $text Encrypted string to decrypt, normal string to encrypt
* @param string $key Key to use
* @return string Encrypted/Decrypted string
* @access public
* @static
*/
public static function cipher($text, $key) {
if (empty($key)) {
@@ -32,7 +32,6 @@ class String {
*
* @see http://www.ietf.org/rfc/rfc4122.txt
* @return RFC 4122 UUID
* @static
*/
public static function uuid() {
$node = env('SERVER_ADDR');
@@ -111,8 +110,6 @@ public static function uuid() {
* @param string $leftBound The left boundary to ignore separators in.
* @param string $rightBound The right boundary to ignore separators in.
* @return array Array of tokens in $data.
* @access public
* @static
*/
public static function tokenize($data, $separator = ',', $leftBound = '(', $rightBound = ')') {
if (empty($data) || is_array($data)) {
@@ -202,8 +199,6 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ
* to be replaced with val
* @param string $options An array of options, see description above
* @return string
* @access public
* @static
*/
public static function insert($str, $data, $options = array()) {
$defaults = array(
@@ -268,8 +263,6 @@ public static function insert($str, $data, $options = array()) {
* @param string $str
* @param string $options
* @return string
* @access public
* @static
* @see String::insert()
*/
public static function cleanInsert($str, $options) {

0 comments on commit 5d8e27d

Please sign in to comment.
You can’t perform that action at this time.