src/Parser.php
protected function hasRequiredFields($report)
    {
        if (is_array(config("{$this->configBase}.feeds.{$this->feedName}.fields"))) {
            $columns = array_filter(config("{$this->configBase}.feeds.{$this->feedName}.fields"));
            if (count($columns) > 0) {
                foreach ($columns as $column) {
                    if (!isset($report[$column])) {
                        Log::warning(
                            get_class($this) . ': ' .
                            config("{$this->configBase}.parser.name") . " feed '{$this->feedName}' " .
                            "says $column is required but is missing, therefore skipping processing of this incident"
                        );
                        $this->warningCount++;
                        return false;
                    }
                }
            }
        }

        return true;
    }
protected function hasRequiredFields($report)
    {
        if (is_array(config("{$this->configBase}.feeds.{$this->feedName}.fields"))) {
            $columns = array_filter(config("{$this->configBase}.feeds.{$this->feedName}.fields"));
            if (count($columns) > 0) {
                foreach ($columns as $column) {
                    if (!isset($report[$column])) {
                        Log::warning(
                            get_class($this) . ': ' .
                            config("{$this->configBase}.parser.name") . " feed '{$this->feedName}' " .
                            "says $column is required but is missing, therefore skipping processing of this incident"
                        );
                        $this->warningCount++;
                        return false;
                    }
                }
            }
        }

        return true;
    }
protected function hasRequiredFields ( $ report ) { if ( is_array ( config ( "{$this->configBase}.feeds.{$this->feedName}.fields" ) ) ) { $ columns = array_filter ( config ( "{$this->configBase}.feeds.{$this->feedName}.fields" ) ) ; if ( count ( $ columns ) > 0 ) { foreach ( $ columns as $ column ) { if ( ! isset ( $ report [ $ column ] ) ) { Log :: warning ( get_class ( $ this ) . ': ' . config ( "{$this->configBase}.parser.name" ) . " feed '{$this->feedName}' " . "says $column is required but is missing, therefore skipping processing of this incident" ) ; $ this -> warningCount ++ ; return false ; } } } } return true ; }
Check if all required fields are in the report.
@param  array   $report Report data
@return boolean         Returns true or false
Check if all required fields are in the report .