src/DataAwareTrait.php
protected function checkRequiredData()
    {
        if (!isset($this->data)) {
            throw new RuntimeException("'data' property is required for DataAwareTrait to work");
        }
        if (!isset($this->requiredData)) {
            throw new RuntimeException("'requiredData' property is required for DataAwareTrait to work");
        }

        $missing = [];
        foreach ($this->requiredData as $key) {
            if (!isset($this->data[$key])) {
                $missing []= $key;
            }
        }

        if (!count($missing)) {
            return true;
        }

        throw new RuntimeException(
            sprintf("Missing required data field(s) [%s]", implode(",", array_map([$this,"camelize"], $missing)))
        );
    }
protected function checkRequiredData()
    {
        if (!isset($this->data)) {
            throw new RuntimeException("'data' property is required for DataAwareTrait to work");
        }
        if (!isset($this->requiredData)) {
            throw new RuntimeException("'requiredData' property is required for DataAwareTrait to work");
        }

        $missing = [];
        foreach ($this->requiredData as $key) {
            if (!isset($this->data[$key])) {
                $missing []= $key;
            }
        }

        if (!count($missing)) {
            return true;
        }

        throw new RuntimeException(
            sprintf("Missing required data field(s) [%s]", implode(",", array_map([$this,"camelize"], $missing)))
        );
    }
protected function checkRequiredData ( ) { if ( ! isset ( $ this -> data ) ) { throw new RuntimeException ( "'data' property is required for DataAwareTrait to work" ) ; } if ( ! isset ( $ this -> requiredData ) ) { throw new RuntimeException ( "'requiredData' property is required for DataAwareTrait to work" ) ; } $ missing = [ ] ; foreach ( $ this -> requiredData as $ key ) { if ( ! isset ( $ this -> data [ $ key ] ) ) { $ missing [ ] = $ key ; } } if ( ! count ( $ missing ) ) { return true ; } throw new RuntimeException ( sprintf ( "Missing required data field(s) [%s]" , implode ( "," , array_map ( [ $ this , "camelize" ] , $ missing ) ) ) ) ; }
Check that all required data present

@return \Robo\Result
Check that all required data present