Exemplo n.º 1
0
 protected function handleType($type)
 {
     $group = $this->mageAdapter->getGroup($type);
     return array_map(function ($serviceName) use($group) {
         return new Entry(sprintf('\'%s\'', $serviceName), $group[$serviceName], '', $serviceName);
     }, array_keys($group));
 }
Exemplo n.º 2
0
 protected function handleType($type, TypeResolveEvent $e, Project $project)
 {
     $chain = $e->getChain();
     $args = $chain->getArgs();
     $firstArg = array_pop($args);
     $firstArg = $firstArg->value;
     if (!$firstArg instanceof String_) {
         return;
         //no string so bye bye
     }
     $result = $this->mageAdapter->getGroup($type);
     $helperName = $firstArg->value;
     $fqcn = $this->useParser->parseFQCN(sprintf('%s', $result[$helperName]));
     $e->setType($fqcn);
 }