Jaxel
Well-known member
In one of my addons, I am getting the following error:
ParseError: syntax error, unexpected token "match", expecting identifier in src/addons/EWR/Torneo/Repository/Match.php at line 8
src/addons/EWR/Torneo/Repository/League.php:85
src/addons/EWR/Torneo/Repository/Match.php
What would be causing this error? I have similar finder functions running perfectly fine.
ParseError: syntax error, unexpected token "match", expecting identifier in src/addons/EWR/Torneo/Repository/Match.php at line 8
- Composer\Autoload\{closure}() in src/vendor/composer/ClassLoader.php at line 427
- Composer\Autoload\ClassLoader->loadClass()
- spl_autoload_call() in src/XF.php at line 406
- XF::createAliasForClass()
- class_exists() in src/XF/Mvc/Entity/Manager.php at line 296
- XF\Mvc\Entity\Manager->getRepository() in src/XF/Mvc/Entity/Repository.php at line 57
- XF\Mvc\Entity\Repository->repository() in src/addons/EWR/Torneo/Repository/League.php at line 85
- EWR\Torneo\Repository\League->prepareViewParams() in src/addons/EWR/Torneo/Pub/Controller/League.php at line 173
- EWR\Torneo\Pub\Controller\League->actionLeague() in src/XF/Mvc/Dispatcher.php at line 362
- XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 264
- XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
- XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
- XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2777
- XF\App->run() in src/XF.php at line 798
- XF::runApp() in index.php at line 23
src/addons/EWR/Torneo/Repository/League.php:85
Code:
$mEntries = $this->repository('EWR\Torneo:Match')->findMatch()->limit($perSide);
src/addons/EWR/Torneo/Repository/Match.php
Code:
<?php
namespace EWR\Torneo\Repository;
use XF\Mvc\Entity\AbstractCollection;
use XF\Mvc\Entity\Repository;
class Match extends Repository
{
public function findMatch()
{
return $this->finder('EWR\Torneo:Match')
->with('Event', true)
->with('PlayerOne')
->with('PlayerOne.User')
->with('PlayerTwo')
->with('PlayerTwo.User');
}
}
What would be causing this error? I have similar finder functions running perfectly fine.