mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-05 19:12:42 +00:00
Removing @access and @static where they are not needed anymore.
This commit is contained in:
parent
09e04c5c1c
commit
5d8e27d97b
4 changed files with 1 additions and 47 deletions
|
@ -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 @@ class CakeLog {
|
|||
* 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 @@ class CakeLog {
|
|||
*
|
||||
* @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 @@ class CakeLog {
|
|||
* @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 @@ class Sanitize {
|
|||
* @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 @@ class Sanitize {
|
|||
* @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 @@ class Sanitize {
|
|||
*
|
||||
* @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 @@ class Sanitize {
|
|||
*
|
||||
* @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 @@ class Sanitize {
|
|||
*
|
||||
* @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 @@ class Sanitize {
|
|||
* @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 @@ class Sanitize {
|
|||
* @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 @@ class Sanitize {
|
|||
* 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,7 +30,6 @@ class Security {
|
|||
* Default hash method
|
||||
*
|
||||
* @var string
|
||||
* @access public
|
||||
*/
|
||||
public static $hashType = null;
|
||||
|
||||
|
@ -38,8 +37,6 @@ class Security {
|
|||
* 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 @@ class Security {
|
|||
* Generate authorization hash.
|
||||
*
|
||||
* @return string Hash
|
||||
* @access public
|
||||
* @static
|
||||
*/
|
||||
public static function generateAuthKey() {
|
||||
if (!class_exists('String')) {
|
||||
|
@ -75,8 +70,6 @@ class Security {
|
|||
*
|
||||
* @param string $authKey Authorization hash
|
||||
* @return boolean Success
|
||||
* @access public
|
||||
* @static
|
||||
* @todo Complete implementation
|
||||
*/
|
||||
function validateAuthKey($authKey) {
|
||||
|
@ -92,8 +85,6 @@ class Security {
|
|||
* @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 @@ class Security {
|
|||
* 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 @@ class Security {
|
|||
* @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 @@ class String {
|
|||
* @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 @@ class String {
|
|||
* 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 @@ class String {
|
|||
* @param string $str
|
||||
* @param string $options
|
||||
* @return string
|
||||
* @access public
|
||||
* @static
|
||||
* @see String::insert()
|
||||
*/
|
||||
public static function cleanInsert($str, $options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue