Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
moveToPreviousLine example
$EOF
= !
$this
->
moveToNextLine
(
)
;
if
(
!
$EOF
)
{
++
$movements
;
}
}
else
{
$newIndent
=
$this
->
getCurrentLineIndentation
(
)
;
}
}
while
(
!
$EOF
&& null ===
$newIndent
)
;
for
(
$i
= 0;
$i
<
$movements
; ++
$i
)
{
$this
->
moveToPreviousLine
(
)
;
}
$unindentedEmbedBlock
=
$this
->
isStringUnIndentedCollectionItem
(
)
;
if
(
!
$this
->
isCurrentLineEmpty
(
)
&& 0 ===
$newIndent
&& !
$unindentedEmbedBlock
)
{
throw
new
ParseException
(
'Indentation problem.',
$this
->
getRealCurrentLineNb
(
)
+ 1,
$this
->currentLine,
$this
->filename
)
;
}
}
else
{
$newIndent
=
$indentation
;
}
$EOF
= !
$this
->
moveToNextLine
(
)
;
if
(
!
$EOF
)
{
++
$movements
;
}
}
else
{
$newIndent
=
$this
->
getCurrentLineIndentation
(
)
;
}
}
while
(
!
$EOF
&& null ===
$newIndent
)
;
for
(
$i
= 0;
$i
<
$movements
; ++
$i
)
{
$this
->
moveToPreviousLine
(
)
;
}
$unindentedEmbedBlock
=
$this
->
isStringUnIndentedCollectionItem
(
)
;
if
(
!
$this
->
isCurrentLineEmpty
(
)
&& 0 ===
$newIndent
&& !
$unindentedEmbedBlock
)
{
throw
new
ParseException
(
'Indentation problem.',
$this
->
getRealCurrentLineNb
(
)
+ 1,
$this
->currentLine,
$this
->filename
)
;
}
}
else
{
$newIndent
=
$indentation
;
}