aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/arrayparser.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-02-19 07:04:37 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-02-19 07:04:37 +0100
commit1e321406ee2d973e937637ab090cbd83a6eb40cf (patch)
tree78eca74636ab68b3f52ebac9c013c55a1526bd43 /lib/private/arrayparser.php
parent635b8f6b83ae37ac262c5f7a0bd40697824b9b67 (diff)
parentc6f4f85e27a10459422ab9789c894d13f0cd34c7 (diff)
downloadnextcloud-server-1e321406ee2d973e937637ab090cbd83a6eb40cf.tar.gz
nextcloud-server-1e321406ee2d973e937637ab090cbd83a6eb40cf.zip
Merge pull request #7114 from owncloud/scrutinizer_documentation_patches
polish documentation based on scrutinizer patches
Diffstat (limited to 'lib/private/arrayparser.php')
-rw-r--r--lib/private/arrayparser.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/private/arrayparser.php b/lib/private/arrayparser.php
index 3bb394a5163..c4ad1264fbb 100644
--- a/lib/private/arrayparser.php
+++ b/lib/private/arrayparser.php
@@ -30,6 +30,9 @@ class ArrayParser {
const TYPE_STRING = 3;
const TYPE_ARRAY = 4;
+ /**
+ * @param string $string
+ */
function parsePHP($string) {
$string = $this->stripPHPTags($string);
$string = $this->stripAssignAndReturn($string);
@@ -47,6 +50,9 @@ class ArrayParser {
return $string;
}
+ /**
+ * @param string $string
+ */
function stripAssignAndReturn($string) {
$string = trim($string);
if (substr($string, 0, 6) === 'return') {
@@ -74,6 +80,9 @@ class ArrayParser {
return null;
}
+ /**
+ * @param string $string
+ */
function getType($string) {
$string = strtolower($string);
$first = substr($string, 0, 1);
@@ -90,19 +99,31 @@ class ArrayParser {
}
}
+ /**
+ * @param string $string
+ */
function parseString($string) {
return substr($string, 1, -1);
}
+ /**
+ * @param string $string
+ */
function parseNum($string) {
return intval($string);
}
+ /**
+ * @param string $string
+ */
function parseBool($string) {
$string = strtolower($string);
return $string === 'true';
}
+ /**
+ * @param string $string
+ */
function parseArray($string) {
$body = substr($string, 5);
$body = trim($body);
@@ -131,6 +152,9 @@ class ArrayParser {
return $result;
}
+ /**
+ * @param string $body
+ */
function splitArray($body) {
$inSingleQuote = false;//keep track if we are inside quotes
$inDoubleQuote = false;