Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parse error: syntax error, unexpected end of file, expecting function (T_FUNCTION) inmodule\Album\Module.php on line 25 [closed]

I have error on my module.php.

I got the code here.

I am following the instructions but I don't know where I get it wrong.

Please see my code below:

    <?php
namespace Album;

class Module
{
    public function getAutoloaderConfig()
    {
        return array(
            'Zend\Loader\ClassMapAutoloader' => array(
                __DIR__ . '/autoload_classmap.php',
            ),
            'Zend\Loader\StandardAutoloader' => array(
                'namespaces' => array(
                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
                ),
            ),
        );
    }

    public function getConfig()
    {
        return include __DIR__ . '/config/module.config.php';
    }
like image 442
arjay0601 Avatar asked Nov 24 '12 09:11

arjay0601


People also ask

How do you fix an unexpected end of file syntax error?

Once you have confirmed the issue is due to an unexpected end-of-file error, the easiest way to resolve the issue is to restore the website to the last known-good state, if possible. This is most likely the point just prior to any recent code changes.

What is parse error syntax error unexpected end of file?

This error is typically caused by a missing } used in PHP to denote content belonging to a WHILE, IF, or FOR loop. If you decide you no longer want to "do that", be very careful to not remove the } as I have done here.


1 Answers

Your code lacks closing bracket at the end. Add } at the end of your script, to close class block

like image 78
Marcin Orlowski Avatar answered Sep 28 '22 05:09

Marcin Orlowski