comparison vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/PhpParser.php @ 12:7a779792577d

Update Drupal core to v8.4.5 (via Composer)
author Chris Cannam
date Fri, 23 Feb 2018 15:52:07 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
11:bfffd8d7479a 12:7a779792577d
40 { 40 {
41 if (method_exists($class, 'getUseStatements')) { 41 if (method_exists($class, 'getUseStatements')) {
42 return $class->getUseStatements(); 42 return $class->getUseStatements();
43 } 43 }
44 44
45 if (false === $filename = $class->getFilename()) { 45 if (false === $filename = $class->getFileName()) {
46 return array(); 46 return array();
47 } 47 }
48 48
49 $content = $this->getFileContent($filename, $class->getStartLine()); 49 $content = $this->getFileContent($filename, $class->getStartLine());
50 50
65 * Gets the content of the file right up to the given line number. 65 * Gets the content of the file right up to the given line number.
66 * 66 *
67 * @param string $filename The name of the file to load. 67 * @param string $filename The name of the file to load.
68 * @param integer $lineNumber The number of lines to read from file. 68 * @param integer $lineNumber The number of lines to read from file.
69 * 69 *
70 * @return string The content of the file. 70 * @return string|null The content of the file or null if the file does not exist.
71 */ 71 */
72 private function getFileContent($filename, $lineNumber) 72 private function getFileContent($filename, $lineNumber)
73 { 73 {
74 if ( ! is_file($filename)) { 74 if ( ! is_file($filename)) {
75 return null; 75 return null;