protected function granularity()
    {
        $granularity = $this->config('diff.granularity', $this->activity->model_type);

        switch ($granularity) {
            case 'character':
                return new \cogpowered\FineDiff\Granularity\Character;
            case 'word':
                return new \cogpowered\FineDiff\Granularity\Word;
            case 'sentence':
                return new \cogpowered\FineDiff\Granularity\Sentence;
            case 'paragraph':
                return new \cogpowered\FineDiff\Granularity\Paragraph;
        }

        throw new InvalidArgumentException("The '$granularity' granularity is not valid.");
    }
protected function granularity()
    {
        $granularity = $this->config('diff.granularity', $this->activity->model_type);

        switch ($granularity) {
            case 'character':
                return new \cogpowered\FineDiff\Granularity\Character;
            case 'word':
                return new \cogpowered\FineDiff\Granularity\Word;
            case 'sentence':
                return new \cogpowered\FineDiff\Granularity\Sentence;
            case 'paragraph':
                return new \cogpowered\FineDiff\Granularity\Paragraph;
        }

        throw new InvalidArgumentException("The '$granularity' granularity is not valid.");
    }
protected function granularity ( ) { $ granularity = $ this -> config ( 'diff.granularity' , $ this -> activity -> model_type ) ; switch ( $ granularity ) { case 'character' : return new \ cogpowered \ FineDiff \ Granularity \ Character ; case 'word' : return new \ cogpowered \ FineDiff \ Granularity \ Word ; case 'sentence' : return new \ cogpowered \ FineDiff \ Granularity \ Sentence ; case 'paragraph' : return new \ cogpowered \ FineDiff \ Granularity \ Paragraph ; } throw new InvalidArgumentException ( "The '$granularity' granularity is not valid." ) ; }
Get the granularity.

@return \cogpowered\FineDiff\Granularity\Granularity

@throws \InvalidArgumentException
Get the granularity .