private function validatePayloadSize(array $rawData, $fieldName, $maxSize)
    {
        if (!isset($rawData[$fieldName])) {
            return;
        }
        if (strlen(json_encode($rawData[$fieldName])) > $maxSize) {
            throw new Exception(
                ucfirst($fieldName)." payload is to big (max {$maxSize} bytes)",
                Exception::MALFORMED_REQUEST
            );
        }
    }
private function validatePayloadSize(array $rawData, $fieldName, $maxSize)
    {
        if (!isset($rawData[$fieldName])) {
            return;
        }
        if (strlen(json_encode($rawData[$fieldName])) > $maxSize) {
            throw new Exception(
                ucfirst($fieldName)." payload is to big (max {$maxSize} bytes)",
                Exception::MALFORMED_REQUEST
            );
        }
    }
private function validatePayloadSize ( array $ rawData , $ fieldName , $ maxSize ) { if ( ! isset ( $ rawData [ $ fieldName ] ) ) { return ; } if ( strlen ( json_encode ( $ rawData [ $ fieldName ] ) ) > $ maxSize ) { throw new Exception ( ucfirst ( $ fieldName ) . " payload is to big (max {$maxSize} bytes)" , Exception :: MALFORMED_REQUEST ) ; } }
Validate size of json representation of passed payload

@param array $rawData
@param string $fieldName
@param int $maxSize
@throws \CodeMonkeysRu\GCM\Exception
@return void
Validate size of json representation of passed payload