public function setScale($scale)
    {
        $valid = ['b', 'c', 'f', 'r'];
        $scale = substr((string) $scale, 0, 1);
        $scale = in_array($scale, $valid)
            ? $scale
            : (!empty($this->thumbConf['cropping']) ? substr($this->thumbConf['cropping'], 0, 1) : 'c');

        $this->scale = $scale;

        return $this;
    }
public function setScale($scale)
    {
        $valid = ['b', 'c', 'f', 'r'];
        $scale = substr((string) $scale, 0, 1);
        $scale = in_array($scale, $valid)
            ? $scale
            : (!empty($this->thumbConf['cropping']) ? substr($this->thumbConf['cropping'], 0, 1) : 'c');

        $this->scale = $scale;

        return $this;
    }
public function setScale ( $ scale ) { $ valid = [ 'b' , 'c' , 'f' , 'r' ] ; $ scale = substr ( ( string ) $ scale , 0 , 1 ) ; $ scale = in_array ( $ scale , $ valid ) ? $ scale : ( ! empty ( $ this -> thumbConf [ 'cropping' ] ) ? substr ( $ this -> thumbConf [ 'cropping' ] , 0 , 1 ) : 'c' ) ; $ this -> scale = $ scale ; return $ this ; }
Set the thumbnail scaling method.

@param string $scale

@return Thumbnail
Set the thumbnail scaling method .