public function allowedFileExtensions($fileExtensions)
    {
        if (!is_array($fileExtensions)) {
            $fileExtensions = [$fileExtensions];
        }
        $this->extensions = array_unique(array_merge($this->extensions, $fileExtensions));

        return $this;
    }
public function allowedFileExtensions($fileExtensions)
    {
        if (!is_array($fileExtensions)) {
            $fileExtensions = [$fileExtensions];
        }
        $this->extensions = array_unique(array_merge($this->extensions, $fileExtensions));

        return $this;
    }
public function allowedFileExtensions ( $ fileExtensions ) { if ( ! is_array ( $ fileExtensions ) ) { $ fileExtensions = [ $ fileExtensions ] ; } $ this -> extensions = array_unique ( array_merge ( $ this -> extensions , $ fileExtensions ) ) ; return $ this ; }
Sets a list of filename extensions for valid php source code files.

@param array|string $fileExtensions
List of valid file extensions without leading dot.

@return $this
Sets a list of filename extensions for valid php source code files .