Skip to content

Problem with ReadingTime::minute method result #3

@peter279k

Description

@peter279k

As title, it seems that ReadingTime::minute method result should be integer type.

......
    public function minutes()
    {
        return str_word_count($this->content) / $this->wordsPerMinute;
    }
......

The original result will return float type and it cannot be used directly after calculating reading time.

I think it should cast this result to be integer type.

@DivineOmega, what do you think about that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions