Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BladeOneLogic: Syntax Error using switches #2

Closed
Papagaai35 opened this issue Oct 17, 2016 · 1 comment
Closed

BladeOneLogic: Syntax Error using switches #2

Papagaai35 opened this issue Oct 17, 2016 · 1 comment

Comments

@Papagaai35
Copy link

The following code:

@switch($countrySelected)
    @case(1)
        first country selected<br>
    @case(2)
        second country selected<br>
    @defaultcase()
        other country selected<br>
@endswitch()

with

use eftec\bladeone\BladeOne;
use eftec\bladeone\BladeOneHtml;
use eftec\bladeone\BladeOneLogic;;

class Blade extends BladeOne{
    use BladeOneLogic;
}
$blade = new Blade("/var/www/views","/var/www/tmp");
$blade->run("view")

retults in the following error:
Parse error: syntax error, unexpected ' ', expecting case (T_CASE) or default (T_DEFAULT) or '}' in /var/www/tmp/test _a94a8fe5ccb19ba61c4c0873d391e987982fbbd3 on line 2

@Johntaa
Copy link
Contributor

Johntaa commented Oct 18, 2016

delete the white space between @switch and the first @case
http://stackoverflow.com/a/28458649

@jorgecc jorgecc closed this as completed May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants