Skip to content

Commit

Permalink
Removing @access and @static where they are not needed anymore.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jul 6, 2010
1 parent 09e04c5 commit 5d8e27d
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 47 deletions.
10 changes: 1 addition & 9 deletions cake/libs/cake_log.php
Expand Up @@ -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();

Expand Down Expand Up @@ -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'));
}
Expand Down Expand Up @@ -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);
Expand All @@ -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]);
Expand Down Expand Up @@ -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')) {
Expand Down
18 changes: 0 additions & 18 deletions cake/libs/sanitize.php
Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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) {
Expand Down
13 changes: 0 additions & 13 deletions cake/libs/security.php
Expand Up @@ -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')) {
Expand All @@ -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')) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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) {
Expand All @@ -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)) {
Expand Down
7 changes: 0 additions & 7 deletions cake/libs/string.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 5d8e27d

Please sign in to comment.