src/JsonApiParser.php
private function getIncludedResource($id, $type)
    {
        foreach ($this->included as $included) {
            $includedId = Arr::get($included, 'id');
            $includedType = Arr::get($included, 'type');

            if ((string) $includedType === (string) $type && (string) $includedId === (string) $id) {
                return $included;
            }
        }

        return $this->getDefaultIncludedResource($id, $type);
    }
private function getIncludedResource($id, $type)
    {
        foreach ($this->included as $included) {
            $includedId = Arr::get($included, 'id');
            $includedType = Arr::get($included, 'type');

            if ((string) $includedType === (string) $type && (string) $includedId === (string) $id) {
                return $included;
            }
        }

        return $this->getDefaultIncludedResource($id, $type);
    }
private function getIncludedResource ( $ id , $ type ) { foreach ( $ this -> included as $ included ) { $ includedId = Arr :: get ( $ included , 'id' ) ; $ includedType = Arr :: get ( $ included , 'type' ) ; if ( ( string ) $ includedType === ( string ) $ type && ( string ) $ includedId === ( string ) $ id ) { return $ included ; } } return $ this -> getDefaultIncludedResource ( $ id , $ type ) ; }
Get a resource that is in the included array

Returns default resource if it was not able to find a resource with
the given type and id.

@param integer $id
@param string $type
@return bool|mixed
Get a resource that is in the included array