Я новичок в Sublime Text 3, и у меня проблемы с функцией автоматического заполнения Intel Sublime Code. Вот пример кода, имеющего проблему.
namespace Core\Component\Services\Application\Service;
use Core\Component\Services\Application\Service\RemoveEmployeeRequest;
use Core\Component\Services\Domain\Model\Employee\EmployeeRepositoryInterface;
use Core\Port\Persistence\DatabaseAdapterInterface;
class RemoveEmployeeService
{
public $databaseAdapter;
public $employeeRepository;
public function __construct(
DatabaseAdapterInterface $databaseAdapter,
EmployeeRepositoryInterface $employeeRepository
) {
$this->databaseAdapter = $databaseAdapter;
$this->employeeRepository = $employeeRepository;
}
public function execute(RemoveEmployeeRequest $request)
{
$id = $request->id();
$this->databaseAdapter->remove($id);
}
}
Когда я набираю $ request -> и нажимаю CTRL + SPACE, автозаполнение работает нормально, показывая все методы из RemoveEmployeeRequest .
Но когда я набираю $ this-> databaseAdapter -> и нажимаю CTRL + SPACE, автозаполнение не работает, показывая консольное сообщение:
оценка 'this.databaseAdapter' на RemoveEmployeeService.class.php # 26: не удалось разрешить первую часть 'databaseAdapter'
Follow codeIntel.log :
Doing CodeIntel for 'PHP' (hold on)...
eval 'this.databaseAdapter' at RemoveEmployeeService.class.php#26 <Trigger 'php-complete-object-members' at 793>
_hit_from_citdl:: expr: 'this.databaseAdapter', scoperef: (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service', 'RemoveEmployeeService', 'execute'])
_hit_from_citdl:: expr tokens: ['this', 'databaseAdapter']
_hits_from_first_part:: find 'this ...' starting at (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service', 'RemoveEmployeeService', 'execute']):
_hits_from_first_part:: Special handling for 'this'
_hits_from_first_part:: need this for <Element 'scope' at 0x0000004AC1270C88>
_return_with_hit:: hit is okay: (<Element 'scope' at 0x0000004AC1270C88>, (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service', 'RemoveEmployeeService']))
_hits_from_first_part:: this returning scoperef: (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service', 'RemoveEmployeeService'])
_hit_from_getattr:: resolve 'databaseAdapter' on <Element 'scope' at 0x0000004AC1270C88> in (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service', 'RemoveEmployeeService']):
_hit_from_getattr:: attr is <Element 'variable' at 0x0000004AC1270C18> in <Element 'scope' at 0x0000004AC1270C88>
_hit_from_variable_type_inference:: resolve 'databaseAdapter' type inference for <Element 'variable' at 0x0000004AC1270C18>:
_hit_from_citdl:: expr: 'databaseAdapter', scoperef: (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service'])
_hit_from_citdl:: expr tokens: ['databaseAdapter']
_hits_from_first_part:: find 'databaseAdapter ...' starting at (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service']):
_hits_from_first_part:: scoperef now (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service']):
_hits_from_first_part:: checking namespace aliases
_hits_from_first_part:: module: 'Core\\Component\\Services\\Application\\Service', symbol: 'RemoveEmployeeRequest', alias: None
_hits_from_first_part:: module: 'Core\\Component\\Services\\Domain\\Model\\Employee', symbol: 'EmployeeRepositoryInterface', alias: None
_hits_from_first_part:: module: 'Core\\Port\\Persistence', symbol: 'DatabaseAdapterInterface', alias: None
_hits_from_first_part:: checking for a FQN hit
_fqn_for_expression:: 'databaseAdapter' => 'Core\\Component\\Services\\Application\\Service\\databaseAdapter'
_hit_from_citdl:: expr: 'Core\\Component\\Services\\Application\\Service\\databaseAdapter', scoperef: (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service'])
_hit_from_citdl:: expr tokens: ['Core\\Component\\Services\\Application\\Service\\databaseAdapter']
_hits_from_first_part:: find 'Core\Component\Services\Application\Service\databaseAdapter ...' starting at (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service']):
_fqn_for_expression:: 'Core\\Component\\Services\\Application\\Service\\databaseAdapter' => 'Core\\Component\\Services\\Application\\Service\\Core\\Component\\Services\\Application\\Service\\databaseAdapter'
_hits_from_namespace:: fqn 'Core\\Component\\Services\\Application\\Service\\Core\\Component\\Services\\Application\\Service\\databaseAdapter', scoperef: (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service'])
_hits_from_namespace:: checking for sub-namespace match: 'Core\\Component\\Services\\Application\\Service\\Core\\Component\\Services\\Application\\Service'
_hits_from_first_part:: no namespace hits
_hits_from_first_part:: scoperef now (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service']):
_hits_from_first_part:: checking namespace aliases
_hits_from_first_part:: module: 'Core\\Component\\Services\\Application\\Service', symbol: 'RemoveEmployeeRequest', alias: None
_hits_from_first_part:: module: 'Core\\Component\\Services\\Domain\\Model\\Employee', symbol: 'EmployeeRepositoryInterface', alias: None
_hits_from_first_part:: module: 'Core\\Port\\Persistence', symbol: 'DatabaseAdapterInterface', alias: None
_hits_from_first_part:: pt3: is 'Core\Component\Services\Application\Service\Core\Component\Services\Application\Service\databaseAdapter' accessible on (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service'])? no
_hits_from_first_part:: scoperef now (<Element 'scope' at 0x0000004AC11C50B8>, []):
_hits_from_first_part:: checking namespace aliases
_hits_from_first_part:: pt3: is 'Core\Component\Services\Application\Service\Core\Component\Services\Application\Service\databaseAdapter' accessible on (<Element 'scope' at 0x0000004AC11C50B8>, [])? no
_hit_from_elem_imports:: trying import everything: tokens: ['Core\\Component\\Services\\Application\\Service\\databaseAdapter']
_hit_from_elem_imports:: trying with lpath: ('Core\\Component\\Services\\Application\\Service\\databaseAdapter',)
_hit_from_elem_imports:: ie: lookup ('Core\\Component\\Services\\Application\\Service\\databaseAdapter',) in <PHP curdirlib> => []
_hit_from_elem_imports:: ie: lookup ('Core\\Component\\Services\\Application\\Service\\databaseAdapter',) in <PHP extradirslib> => []
_hit_from_elem_imports:: ie: lookup ('Core\\Component\\Services\\Application\\Service\\databaseAdapter',) in <PHP cataloglib: > => []
_hit_from_elem_imports:: ie: lookup ('Core\\Component\\Services\\Application\\Service\\databaseAdapter',) in <php-5.5 stdlib> => []
_hit_from_elem_imports:: ie: no matches found
_hits_from_first_part:: pt3: is 'databaseAdapter' accessible on (<Element 'scope' at 0x0000004AC11C50B8>, ['Core\\Component\\Services\\Application\\Service'])? no
_hits_from_first_part:: scoperef now (<Element 'scope' at 0x0000004AC11C50B8>, []):
_hits_from_first_part:: checking namespace aliases
_hits_from_first_part:: pt3: is 'databaseAdapter' accessible on (<Element 'scope' at 0x0000004AC11C50B8>, [])? no
_hit_from_elem_imports:: trying import everything: tokens: ['databaseAdapter']
_hit_from_elem_imports:: trying with lpath: ('databaseAdapter',)
_hit_from_elem_imports:: ie: lookup ('databaseAdapter',) in <PHP curdirlib> => []
_hit_from_elem_imports:: ie: lookup ('databaseAdapter',) in <PHP extradirslib> => []
_hit_from_elem_imports:: ie: lookup ('databaseAdapter',) in <PHP cataloglib: > => []
_hit_from_elem_imports:: ie: lookup ('databaseAdapter',) in <php-5.5 stdlib> => []
_hit_from_elem_imports:: ie: no matches found
evaluating 'this.databaseAdapter' at RemoveEmployeeService.class.php#26: could not resolve first part of 'databaseAdapter'
done eval: eval error
Done 'PHP' CodeIntel! Full CodeIntel took 31ms
+ Warning: evaluating 'this.databaseAdapter' at RemoveEmployeeService.class.php#26: could not resolve first part of 'databaseAdapter'
Windows 7 64 битSublime 3.2.2, сборка 3211 с:SublimeCodeIntel 2.2.0 (пользовательские настройки пустые)PHP Companion 1.5.0PHPcs2017.08.04.06.54.27
Спасибо!