src/Analyse/Callback/Analyse/Objects/Getter.php
protected function populateGetterLists(array $methodList, $isInScope, ReflectionClass $ref)
    {
        /** @var \ReflectionMethod $method */
        foreach ($methodList as $method) {
            // Check, if the method is really available, inside the analysis
            // context. A inherited private method can not be called inside the
            // $this context.
            if ($isInScope === true &&
                $method->isPrivate() === true &&
                $method->getDeclaringClass()->getName() !== $ref->getName()
            ) {
                // We skip this one, it's out of scope.
                // Meh, as of 03-11-2018, I have never seen a private getter in
                // my whole life.
                continue;
            }

            if (strpos($method->getName(), 'get') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->normalGetter[] = $method;
                }
            } elseif (strpos($method->getName(), 'is') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->isGetter[] = $method;
                }
            } elseif (strpos($method->getName(), 'has') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->hasGetter[] = $method;
                }
            }
        }
    }
protected function populateGetterLists(array $methodList, $isInScope, ReflectionClass $ref)
    {
        /** @var \ReflectionMethod $method */
        foreach ($methodList as $method) {
            // Check, if the method is really available, inside the analysis
            // context. A inherited private method can not be called inside the
            // $this context.
            if ($isInScope === true &&
                $method->isPrivate() === true &&
                $method->getDeclaringClass()->getName() !== $ref->getName()
            ) {
                // We skip this one, it's out of scope.
                // Meh, as of 03-11-2018, I have never seen a private getter in
                // my whole life.
                continue;
            }

            if (strpos($method->getName(), 'get') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->normalGetter[] = $method;
                }
            } elseif (strpos($method->getName(), 'is') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->isGetter[] = $method;
                }
            } elseif (strpos($method->getName(), 'has') === 0) {
                /** @var \ReflectionMethod $method */
                $parameters = $method->getParameters();
                if (empty($parameters)) {
                    $this->hasGetter[] = $method;
                }
            }
        }
    }
protected function populateGetterLists ( array $ methodList , $ isInScope , ReflectionClass $ ref ) { /** @var \ReflectionMethod $method */ foreach ( $ methodList as $ method ) { // Check, if the method is really available, inside the analysis // context. A inherited private method can not be called inside the // $this context. if ( $ isInScope === true && $ method -> isPrivate ( ) === true && $ method -> getDeclaringClass ( ) -> getName ( ) !== $ ref -> getName ( ) ) { // We skip this one, it's out of scope. // Meh, as of 03-11-2018, I have never seen a private getter in // my whole life. continue ; } if ( strpos ( $ method -> getName ( ) , 'get' ) === 0 ) { /** @var \ReflectionMethod $method */ $ parameters = $ method -> getParameters ( ) ; if ( empty ( $ parameters ) ) { $ this -> normalGetter [ ] = $ method ; } } elseif ( strpos ( $ method -> getName ( ) , 'is' ) === 0 ) { /** @var \ReflectionMethod $method */ $ parameters = $ method -> getParameters ( ) ; if ( empty ( $ parameters ) ) { $ this -> isGetter [ ] = $ method ; } } elseif ( strpos ( $ method -> getName ( ) , 'has' ) === 0 ) { /** @var \ReflectionMethod $method */ $ parameters = $ method -> getParameters ( ) ; if ( empty ( $ parameters ) ) { $ this -> hasGetter [ ] = $ method ; } } } }
Filter and then populate the method list. We only dump those that have no
parameters and start with has, is or get.

@param array $methodList
@param $isInScope
@param \Brainworxx\Krexx\Service\Reflection\ReflectionClass $ref
Filter and then populate the method list . We only dump those that have no parameters and start with has is or get .