Is it possible to remove variable repetition here? /**
    * Class stringHelperK
    * Helper Class to deal with small string manipulations.
*/
class stringHelperK {

    public function normalizeStringK($string) {
        return $this-&gt;removeAccents(
            $this-&gt;replaceSpacesWithSlashes($string)
        );
    }

    /**
     * @param $string
     * @return string
     */
    public function removeAccents($string){
        return strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
    }

    /**
     * @param $string
     * @return string
     */
    public function replaceSpacesWithSlashes($string) {
        return strtolower(str_replace(" ", "-",$string));
    }
} 


I have several questions regarding this code:


$string is used across all class methods. Should it be a property?  If so, how can I transform this accordingly? I mean, I see $string everywhere and it feels isn't correct. 


Is it, something like this, better:

/**
    * Class stringHelperK
    * Helper Class to deal with small string manipulations.
*/
class stringHelperK {

    public $string;

    public function normalizeStringK($string) {
        return $this-&gt;removeAccents(
            $this-&gt;replaceSpacesWithSlashes($this-&gt;string)
        );
    }

    /**
     * @param $string
     * @return string
     */
    public function removeAccents($string){
        return strtr($this-&gt;string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
    }

    /**
     * @param $string
     * @return string
     */
    public function replaceSpacesWithSlashes($string) {
        return strtolower(str_replace(" ", "-",$his-&gt;string));
    }
} 


Or should it be, private $_string, and we should use getters and setters?
This class looks like a utility class, and you could use static functions: you then wouldn't need to instantiate it:

class StringHelperK {

    public static function normalizeStringK($string) {
        return static::removeAccents(
            static::replaceSpacesWithSlashes($string)
        );
    }

    public static function removeAccents($string){
        return strtr($string,'àáâãäçèéêëìíîïñòóôõöùúûüýÿÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜÝ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY');
    }

    public static function replaceSpacesWithSlashes($string) {
        return strtolower(str_replace(" ", "-",$string));
    }
}


To normalize a string, you would then do: StringHelperK::normalizeStringK("blabla").

And no, $string should definitely not be a property, and I see nothing wrong with passing is as an argument to each function.