From 58d8725397188f207264f2c671a4eca96b1b7d29 Mon Sep 17 00:00:00 2001 From: Basil Suter Date: Tue, 2 Feb 2021 10:47:52 +0000 Subject: [PATCH] remove since added changelog --- CHANGELOG.md | 7 +++++++ src/helpers/ArrayHelper.php | 5 +---- src/helpers/ExportHelper.php | 11 +++-------- src/helpers/Json.php | 2 +- src/helpers/RestHelper.php | 3 +-- src/helpers/StringHelper.php | 8 -------- src/helpers/Url.php | 4 ---- 7 files changed, 13 insertions(+), 27 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1a39dfb --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# LUYA YII HELPERS + +All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). + +## 1.0.0 (2. February 2021) + ++ First stable release \ No newline at end of file diff --git a/src/helpers/ArrayHelper.php b/src/helpers/ArrayHelper.php index bdfd68b..8d04485 100644 --- a/src/helpers/ArrayHelper.php +++ b/src/helpers/ArrayHelper.php @@ -24,7 +24,6 @@ class ArrayHelper extends BaseArrayHelper { /** * @var array An array with sensitive keys which are used if no keys will be passed to {{luya\yii\helpers\ArrayHelper::coverSensitiveValues()}}. - * @since 1.0.10 */ public static $sensitiveDefaultKeys = ['password', 'pwd', 'pass', 'passwort', 'pw', 'token', 'hash', 'authorization', 'auth']; @@ -54,7 +53,6 @@ public static function toObject(array $array) * * @param array $data The input data to cover given sensitive key values. `['username' => 'foo', 'password' => 'bar']`. * @param array $key The keys which can contain sensitive data inside the $data array. `['password', 'pwd', 'pass']` if no keys provided the {{luya\yii\helpers\ArrayHelper::$sensitiveDefaultKeys}} is used. - * @since 1.0.6 */ public static function coverSensitiveValues(array $data, array $keys = []) { @@ -152,7 +150,7 @@ public static function typeCast(array $array) * @param array $array The multidimensional array keys. * @param string $searchText The text you where search inside the rows. * @param boolean $sensitive Whether to use strict sensitive search (true) or case insenstivie search (false). - * @param array $keys A list of array keys which should be taken to search in, if empty or not provided it will lookup all array keys by default. {@since 1.0.24} + * @param array $keys A list of array keys which should be taken to search in, if empty or not provided it will lookup all array keys by default. * @return array The modified array depending on the search result hits. */ public static function search(array $array, $searchText, $sensitive = false, array $keys = []) @@ -307,7 +305,6 @@ public static function generateRange($from, $to, $text = null) * * @param array $array The array to combine. * @return array - * @since 1.0.24 */ public static function combine(array $array) { diff --git a/src/helpers/ExportHelper.php b/src/helpers/ExportHelper.php index 75030ad..44e2fcb 100644 --- a/src/helpers/ExportHelper.php +++ b/src/helpers/ExportHelper.php @@ -20,7 +20,7 @@ class ExportHelper * @param array|QueryInterface $input The data to export into a csv * @param array $keys Defines which keys should be packed into the generated CSV. The defined keys does not change the sort behavior of the generated csv. * @param string $header Whether the column name should be set as header inside the csv or not. - * @param array $options Options {@since 1.8.0} + * @param array $options Options * + `sort`: boolean, whether they row should be sorted by its keys, default is true. * @return string The generated CSV as string. */ @@ -39,11 +39,10 @@ public static function csv($input, array $keys = [], $header = true, array $opti * @param array|QueryInterface $input * @param array $keys Defines which keys should be packed into the generated xlsx. The defined keys does not change the sort behavior of the generated xls. * @param bool $header - * @param array $options Options {@since 1.8.0} + * @param array $options Options * + `sort`: boolean, whether they row should be sorted by its keys, default is true. * @return mixed * @throws Exception - * @since 1.0.4 */ public static function xlsx($input, array $keys = [], $header = true, array $options = []) { @@ -62,7 +61,6 @@ public static function xlsx($input, array $keys = [], $header = true, array $opt * * @param array|QueryInterface $input * @return array - * @since 1.0.4 */ protected static function transformInput($input) { @@ -80,11 +78,10 @@ protected static function transformInput($input) * @param string $delimiter * @param array $keys * @param bool $generateHeader - * @param array $options Options {@since 1.8.0} + * @param array $options Options * + `sort`: boolean, whether they row should be sorted by its keys, default is true. * @return array * @throws Exception - * @since 1.0.4 */ protected static function generateContentArray($contentRows, array $keys, $generateHeader = true, $options = []) { @@ -153,7 +150,6 @@ protected static function generateContentArray($contentRows, array $keys, $gener * @param array $input * @param string $delimiter * @return null|string - * @since 1.0.4 */ protected static function generateOutputString(array $input, $delimiter) { @@ -172,7 +168,6 @@ protected static function generateOutputString(array $input, $delimiter) * @param string $delimiter * @param string $enclose * @return string - * @since 1.0.4 */ protected static function generateRow(array $row, $delimiter, $enclose) { diff --git a/src/helpers/Json.php b/src/helpers/Json.php index 0dc4034..e0136ae 100644 --- a/src/helpers/Json.php +++ b/src/helpers/Json.php @@ -12,7 +12,7 @@ * + {{luya\yii\helpers\Json::isJson()}} * * @author Basil Suter - * @since 1.0.3 + * @since 1.0.0 */ class Json extends BaseJson { diff --git a/src/helpers/RestHelper.php b/src/helpers/RestHelper.php index b8b5ca5..4899e8d 100644 --- a/src/helpers/RestHelper.php +++ b/src/helpers/RestHelper.php @@ -9,7 +9,7 @@ /** * Rest API Helper. * - * @since 1.0.20 + * @since 1.0.0 * @author Basil Suter */ class RestHelper @@ -82,7 +82,6 @@ public static function sendModelError(Model $model) * ``` * @param array $errors Provide an array with messages. Where key is the field and value the message. * @return array Returns an array with field and message keys for each item. - * @since 1.0.3 */ public static function sendArrayError(array $errors) { diff --git a/src/helpers/StringHelper.php b/src/helpers/StringHelper.php index c792e7e..20f3e3f 100644 --- a/src/helpers/StringHelper.php +++ b/src/helpers/StringHelper.php @@ -92,7 +92,6 @@ public static function startsWithWildcard($string, $with, $caseSensitive = true) * @param array|string $filters An array of filter conditions, if a string is given he will be exploded by commas. * @param boolean $caseSensitive Whether to match value even when lower/upper case is not correct/same. * @return bool Returns true if one of the given filter conditions matches. - * @since 1.3.0 */ public static function filterMatch($value, $conditions, $caseSensitive = true) { @@ -238,7 +237,6 @@ public static function contains($needle, $haystack, $strict = false) * @param array $options Optional arguments to provide for minification: * - comments: boolean, where html comments should be removed or not. defaults to false * @return mixed Returns the minified content. - * @since 1.0.7 */ public static function minify($content, array $options = []) { @@ -267,7 +265,6 @@ public static function minify($content, array $options = []) * @param integer $length The amount of the chars to cut on the left and right side from the word. * @param string $affix The chars which should be used for prefix and suffix when string is cuted. * @param boolean $caseSensitive Whether the search word in the string even when lower/upper case is not correct. - * @since 1.0.12 */ public static function truncateMiddle($content, $word, $length, $affix = '..', $caseSensitive = false) { @@ -307,7 +304,6 @@ public static function truncateMiddle($content, $word, $length, $affix = '..', $ * @param string $content The content to find the word. * @param string $word The word to find within the content. * @param string $markup The markup used wrap the word to highlight. - * @since 1.0.12 */ public static function highlightWord($content, $word, $markup = '%s') { @@ -336,7 +332,6 @@ public static function highlightWord($content, $word, $markup = '%s') * * @param string $string The string to split into an array * @param integer $length The length of the chars to cut. - * @since 1.0.12 * @see https://www.php.net/manual/de/function.str-split.php#115703 */ public static function mb_str_split($string, $length = 1) @@ -357,7 +352,6 @@ public static function mb_str_split($string, $length = 1) * @param mixed $value The value to check. * @param boolean $strict * @return boolean - * @since 1.2.0 */ public static function isNummeric($value, $strict = true) { @@ -395,7 +389,6 @@ public static function isNummeric($value, $strict = true) * @param array $variables The variables which should be available in the template. * @param boolean $removeEmpty Whether variables in double curly brackets should be removed event the have not be assigned by $variables array. * @return string - * @since 1.5.0 */ public static function template($template, array $variables = [], $removeEmpty = false) { @@ -430,7 +423,6 @@ public static function template($template, array $variables = [], $removeEmpty = * * @param string $text A text which contains a list of items seperated by seperators like commas. * @return array - * @since 1.7.1 */ public static function textList($text, array $seperators = [PHP_EOL, "\n", "\r", "\n\r", ";", ","]) { diff --git a/src/helpers/Url.php b/src/helpers/Url.php index d291bb4..8dbc870 100644 --- a/src/helpers/Url.php +++ b/src/helpers/Url.php @@ -101,7 +101,6 @@ public static function ensureHttp($url, $https = false) * * @param string $url The url to extract * @return string returns the url without protocol or www. subdomain - * @since 1.0.20 */ public static function cleanHost($url) { @@ -114,7 +113,6 @@ public static function cleanHost($url) * * @param string $url The url to extract * @return string Returns only the domain from the url. - * @since 1.0.20 */ public static function domain($url) { @@ -129,7 +127,6 @@ public static function domain($url) * @param string|array $append A string with url fragments or an array which will be processed by http_build_query. * @param boolean $scheme Add full path schema to the url, by default false. Otherwise absolute paths are used (including domain). * @return string - * @since 1.0.25 */ public static function appendQuery($append, $scheme = false) { @@ -144,7 +141,6 @@ public static function appendQuery($append, $scheme = false) * @param string $url The url where the data should be appended. * @param string|array $append The query param to append, if an array is given http_build_query() will taken to build the query string. * @return string Returns the url with appended query string - * @since 1.0.25 */ public static function appendQueryToUrl($url, $append) {