Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Zend\Code\Scanner\ClassScanner don't parse constants with docblock #4457

Closed
MatyCZ opened this issue May 10, 2013 · 1 comment
Closed

Zend\Code\Scanner\ClassScanner don't parse constants with docblock #4457

MatyCZ opened this issue May 10, 2013 · 1 comment
Milestone

Comments

@MatyCZ
Copy link
Contributor

MatyCZ commented May 10, 2013

Class Scanner don't parse constants when previous line contains docblock.

Example classes:

  • Zend\Authentication\Result
  • Zend\ModuleManager\ModuleEvent

Example of calling \Zend\Code\Scanner\ClassScanner::getconstants():

<?php

class WithDocblock
{
    /**
     * Example constants
     */
    const TEST_A = 'alpha';
    const TEST_B = 'beta';

    public function init()
    {
    }
}

class WithoutDocblock
{
    const TEST_A = 'alpha';
    const TEST_B = 'beta';

    public function init()
    {
    }
}

Results:

array(0) {
}

array(2) {
  [0] => string(6) "TEST_A"
  [1] => string(6) "TEST_B"
}
@weierophinney
Copy link
Member

Closed with #4465

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants