Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isCurrentLineBlank example
$isItUnindentedCollection
=
$this
->
isStringUnIndentedCollectionItem
(
)
;
$isItComment
=
$this
->
isCurrentLineComment
(
)
;
}
$indent
=
$this
->
getCurrentLineIndentation
(
)
;
if
(
$isItUnindentedCollection
&& !
$this
->
isCurrentLineEmpty
(
)
&& !
$this
->
isStringUnIndentedCollectionItem
(
)
&&
$newIndent
===
$indent
)
{
$this
->
moveToPreviousLine
(
)
;
break
;
}
if
(
$this
->
isCurrentLineBlank
(
)
)
{
$data
[
]
=
substr
(
$this
->currentLine,
$newIndent
)
;
continue
;
}
if
(
$indent
>=
$newIndent
)
{
$data
[
]
=
substr
(
$this
->currentLine,
$newIndent
)
;
}
elseif
(
$this
->
isCurrentLineComment
(
)
)
{
$data
[
]
=
$this
->currentLine;
}
elseif
(
0 ==
$indent
)
{
$this
->
moveToPreviousLine
(
)
;
$isItUnindentedCollection
=
$this
->
isStringUnIndentedCollectionItem
(
)
;
$isItComment
=
$this
->
isCurrentLineComment
(
)
;
}
$indent
=
$this
->
getCurrentLineIndentation
(
)
;
if
(
$isItUnindentedCollection
&& !
$this
->
isCurrentLineEmpty
(
)
&& !
$this
->
isStringUnIndentedCollectionItem
(
)
&&
$newIndent
===
$indent
)
{
$this
->
moveToPreviousLine
(
)
;
break
;
}
if
(
$this
->
isCurrentLineBlank
(
)
)
{
$data
[
]
=
substr
(
$this
->currentLine,
$newIndent
)
;
continue
;
}
if
(
$indent
>=
$newIndent
)
{
$data
[
]
=
substr
(
$this
->currentLine,
$newIndent
)
;
}
elseif
(
$this
->
isCurrentLineComment
(
)
)
{
$data
[
]
=
$this
->currentLine;
}
elseif
(
0 ==
$indent
)
{
$this
->
moveToPreviousLine
(
)
;