FML/Script/Script.php
public function addFeature(ScriptFeature $feature)
    {
        if (!in_array($feature, $this->features, true)) {
            array_push($this->features, $feature);
        }
        return $this;
    }
public function addFeature(ScriptFeature $feature)
    {
        if (!in_array($feature, $this->features, true)) {
            array_push($this->features, $feature);
        }
        return $this;
    }
public function addFeature ( ScriptFeature $ feature ) { if ( ! in_array ( $ feature , $ this -> features , true ) ) { array_push ( $ this -> features , $ feature ) ; } return $ this ; }
Add a Script Feature

@api
@param ScriptFeature $feature Script Feature
@return static
Add a Script Feature