private function doCallBackSingleProp($propertyName, callable $callback)
    {
        $result = $callback($this->mutations[$propertyName]);
        if (is_bool($result)) {
            if ($result) {
                if (is_null($this->mutations[$propertyName])) {
                    // Delete
                    $result = 204;
                } else {
                    // Update
                    $result = 200;
                }
            } else {
                // Fail
                $result = 403;
            }
        }
        if (!is_int($result)) {
            throw new UnexpectedValueException('A callback sent to handle() did not return an int or a bool');
        }
        $this->result[$propertyName] = $result;
        if ($result >= 400) {
            $this->failed = true;
        }
    }
private function doCallBackSingleProp($propertyName, callable $callback)
    {
        $result = $callback($this->mutations[$propertyName]);
        if (is_bool($result)) {
            if ($result) {
                if (is_null($this->mutations[$propertyName])) {
                    // Delete
                    $result = 204;
                } else {
                    // Update
                    $result = 200;
                }
            } else {
                // Fail
                $result = 403;
            }
        }
        if (!is_int($result)) {
            throw new UnexpectedValueException('A callback sent to handle() did not return an int or a bool');
        }
        $this->result[$propertyName] = $result;
        if ($result >= 400) {
            $this->failed = true;
        }
    }
private function doCallBackSingleProp ( $ propertyName , callable $ callback ) { $ result = $ callback ( $ this -> mutations [ $ propertyName ] ) ; if ( is_bool ( $ result ) ) { if ( $ result ) { if ( is_null ( $ this -> mutations [ $ propertyName ] ) ) { // Delete $ result = 204 ; } else { // Update $ result = 200 ; } } else { // Fail $ result = 403 ; } } if ( ! is_int ( $ result ) ) { throw new UnexpectedValueException ( 'A callback sent to handle() did not return an int or a bool' ) ; } $ this -> result [ $ propertyName ] = $ result ; if ( $ result >= 400 ) { $ this -> failed = true ; } }
Executes a property callback with the single-property syntax.

@param string   $propertyName
@param callable $callback
Executes a property callback with the single - property syntax .