From 6d7042c84acc6552399f6fea124b0dc733721bd2 Mon Sep 17 00:00:00 2001 From: Juuso Lapinlampi Date: Sat, 7 May 2016 15:13:29 +0000 Subject: Deprecate underscores in PHP function names camelCase is the preferred coding style for function names in the PSR-2 coding style guide used by Pomf since version 2.0.0. Reference: http://www.php-fig.org/psr/psr-2/ --- CHANGELOG.md | 4 ++++ static/classes/Response.class.php | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c935f..391a549 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,10 @@ This project adheres to [Semantic Versioning](http://semver.org/). next major version. (Juuso Lapinlampi) - `get_sha1()` function. This API may be changed or removed in the next major version, switching to SHA-256 hashes. (Juuso Lapinlampi) +- `csv_error`, `csv_success`, `html_error`, `html_success`, `json_error`, + `json_success`, `text_error` and `text_success` functions. The + functions will be renamed to `camelCase` format (e.g. `csvError`, + `htmlSuccess`). (Juuso Lapinlampi) ## `2.0.2` - Unreleased diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 27dbd74..f8555d6 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -105,11 +105,17 @@ class Response echo $response; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function csv_error($description) { return '"error"'."\r\n"."\"$description\""."\r\n"; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function csv_success($files) { $result = '"name","url","hash","size"'."\r\n"; @@ -123,11 +129,17 @@ class Response return $result; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function html_error($code, $description) { return '

ERROR: ('.$code.') '.$description.'

'; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function html_success($files) { $result = ''; @@ -139,6 +151,9 @@ class Response return $result; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function json_error($code, $description) { return json_encode(array( @@ -148,6 +163,9 @@ class Response ), JSON_PRETTY_PRINT); } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function json_success($files) { return json_encode(array( @@ -156,11 +174,17 @@ class Response ), JSON_PRETTY_PRINT); } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function text_error($code, $description) { return 'ERROR: ('.$code.') '.$description; } + /** + * @deprecated 2.1.0 Will be renamed to camelCase format. + */ private static function text_success($files) { $result = ''; -- cgit v1.2.3