src/Rules/AllowedFieldSets.php
public function allow(string $resourceType, array $fields = null): self
    {
        $this->all = false;
        $this->allowed[$resourceType] = $fields;

        return $this;
    }
public function allow(string $resourceType, array $fields = null): self
    {
        $this->all = false;
        $this->allowed[$resourceType] = $fields;

        return $this;
    }
public function allow ( string $ resourceType , array $ fields = null ) : self { $ this -> all = false ; $ this -> allowed [ $ resourceType ] = $ fields ; return $ this ; }
Allow fields for a resource type.

@param string $resourceType
@param string[]|null $fields
the allowed fields, empty array for none allowed, or null for all allowed.
@return $this
Allow fields for a resource type .