private function getEntityGetter($entity, $property)
    {
        $getter = null;

        $prefixes = ['get', 'is', 'has', ''];

        foreach ($prefixes as $prefix) {
            $test = $prefix.ucfirst($property);
            if (method_exists($entity, $test)) {
                $getter = $test;
                break;
            }
        }

        if (null === $getter) {
            throw new \LogicException("Entity has no getter for property `{$property}`.");
        }

        return $getter;
    }
private function getEntityGetter($entity, $property)
    {
        $getter = null;

        $prefixes = ['get', 'is', 'has', ''];

        foreach ($prefixes as $prefix) {
            $test = $prefix.ucfirst($property);
            if (method_exists($entity, $test)) {
                $getter = $test;
                break;
            }
        }

        if (null === $getter) {
            throw new \LogicException("Entity has no getter for property `{$property}`.");
        }

        return $getter;
    }
private function getEntityGetter ( $ entity , $ property ) { $ getter = null ; $ prefixes = [ 'get' , 'is' , 'has' , '' ] ; foreach ( $ prefixes as $ prefix ) { $ test = $ prefix . ucfirst ( $ property ) ; if ( method_exists ( $ entity , $ test ) ) { $ getter = $ test ; break ; } } if ( null === $ getter ) { throw new \ LogicException ( "Entity has no getter for property `{$property}`." ) ; } return $ getter ; }
Gets the correct getter name for an entity property.

@param mixed  $entity
@param string $property

@return string

@throws \LogicException if the entity has no getter for the requested property
Gets the correct getter name for an entity property .