Mercurial > hg > cmmr2012-drupal-site
comparison vendor/psy/psysh/src/Command/DocCommand.php @ 4:a9cd425dd02b
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:11:55 +0000 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
3:307d7a7fd348 | 4:a9cd425dd02b |
---|---|
12 namespace Psy\Command; | 12 namespace Psy\Command; |
13 | 13 |
14 use Psy\Formatter\DocblockFormatter; | 14 use Psy\Formatter\DocblockFormatter; |
15 use Psy\Formatter\SignatureFormatter; | 15 use Psy\Formatter\SignatureFormatter; |
16 use Psy\Input\CodeArgument; | 16 use Psy\Input\CodeArgument; |
17 use Psy\Reflection\ReflectionClassConstant; | |
18 use Psy\Reflection\ReflectionLanguageConstruct; | 17 use Psy\Reflection\ReflectionLanguageConstruct; |
19 use Symfony\Component\Console\Input\InputInterface; | 18 use Symfony\Component\Console\Input\InputInterface; |
20 use Symfony\Component\Console\Output\OutputInterface; | 19 use Symfony\Component\Console\Output\OutputInterface; |
21 | 20 |
22 /** | 21 /** |
85 $this->setCommandScopeVariables($reflector); | 84 $this->setCommandScopeVariables($reflector); |
86 } | 85 } |
87 | 86 |
88 private function getManualDoc($reflector) | 87 private function getManualDoc($reflector) |
89 { | 88 { |
90 switch (get_class($reflector)) { | 89 switch (\get_class($reflector)) { |
91 case 'ReflectionClass': | 90 case 'ReflectionClass': |
92 case 'ReflectionObject': | 91 case 'ReflectionObject': |
93 case 'ReflectionFunction': | 92 case 'ReflectionFunction': |
94 $id = $reflector->name; | 93 $id = $reflector->name; |
95 break; | 94 break; |
123 | 122 |
124 private function getManualDocById($id) | 123 private function getManualDocById($id) |
125 { | 124 { |
126 if ($db = $this->getApplication()->getManualDb()) { | 125 if ($db = $this->getApplication()->getManualDb()) { |
127 return $db | 126 return $db |
128 ->query(sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) | 127 ->query(\sprintf('SELECT doc FROM php_manual WHERE id = %s', $db->quote($id))) |
129 ->fetchColumn(0); | 128 ->fetchColumn(0); |
130 } | 129 } |
131 } | 130 } |
132 } | 131 } |