private function doCallBackMultiProp(array $propertyList, callable $callback)
    {
        $argument = [];
        foreach ($propertyList as $propertyName) {
            $argument[$propertyName] = $this->mutations[$propertyName];
        }

        $result = $callback($argument);

        if (is_array($result)) {
            foreach ($propertyList as $propertyName) {
                if (!isset($result[$propertyName])) {
                    $resultCode = 500;
                } else {
                    $resultCode = $result[$propertyName];
                }
                if ($resultCode >= 400) {
                    $this->failed = true;
                }
                $this->result[$propertyName] = $resultCode;
            }
        } elseif (true === $result) {
            // Success
            foreach ($argument as $propertyName => $propertyValue) {
                $this->result[$propertyName] = is_null($propertyValue) ? 204 : 200;
            }
        } elseif (false === $result) {
            // Fail :(
            $this->failed = true;
            foreach ($propertyList as $propertyName) {
                $this->result[$propertyName] = 403;
            }
        } else {
            throw new UnexpectedValueException('A callback sent to handle() did not return an array or a bool');
        }
    }
private function doCallBackMultiProp(array $propertyList, callable $callback)
    {
        $argument = [];
        foreach ($propertyList as $propertyName) {
            $argument[$propertyName] = $this->mutations[$propertyName];
        }

        $result = $callback($argument);

        if (is_array($result)) {
            foreach ($propertyList as $propertyName) {
                if (!isset($result[$propertyName])) {
                    $resultCode = 500;
                } else {
                    $resultCode = $result[$propertyName];
                }
                if ($resultCode >= 400) {
                    $this->failed = true;
                }
                $this->result[$propertyName] = $resultCode;
            }
        } elseif (true === $result) {
            // Success
            foreach ($argument as $propertyName => $propertyValue) {
                $this->result[$propertyName] = is_null($propertyValue) ? 204 : 200;
            }
        } elseif (false === $result) {
            // Fail :(
            $this->failed = true;
            foreach ($propertyList as $propertyName) {
                $this->result[$propertyName] = 403;
            }
        } else {
            throw new UnexpectedValueException('A callback sent to handle() did not return an array or a bool');
        }
    }
private function doCallBackMultiProp ( array $ propertyList , callable $ callback ) { $ argument = [ ] ; foreach ( $ propertyList as $ propertyName ) { $ argument [ $ propertyName ] = $ this -> mutations [ $ propertyName ] ; } $ result = $ callback ( $ argument ) ; if ( is_array ( $ result ) ) { foreach ( $ propertyList as $ propertyName ) { if ( ! isset ( $ result [ $ propertyName ] ) ) { $ resultCode = 500 ; } else { $ resultCode = $ result [ $ propertyName ] ; } if ( $ resultCode >= 400 ) { $ this -> failed = true ; } $ this -> result [ $ propertyName ] = $ resultCode ; } } elseif ( true === $ result ) { // Success foreach ( $ argument as $ propertyName => $ propertyValue ) { $ this -> result [ $ propertyName ] = is_null ( $ propertyValue ) ? 204 : 200 ; } } elseif ( false === $ result ) { // Fail :( $ this -> failed = true ; foreach ( $ propertyList as $ propertyName ) { $ this -> result [ $ propertyName ] = 403 ; } } else { throw new UnexpectedValueException ( 'A callback sent to handle() did not return an array or a bool' ) ; } }
Executes a property callback with the multi-property syntax.

@param array    $propertyList
@param callable $callback
Executes a property callback with the multi - property syntax .