protected function collect(SimpleXMLElement $coverage, $args = array())
    {
    	extract($args);

    	$data = new Collection(array(
            'repo_token' => $repo_token,
            'source_files' => array(),
            'run_at' => gmdate('Y-m-d H:i:s -0000'),
            'git' => $this->collectFromGit()->all(),
        ));

 		// Before collect hook
     	if ( ! empty($this->hook)) {
     		$data = $this->hook->beforeCollect($data);
     	}

        // Prepare temporary source_files holder
        $sourceArray = new Collection();

        if (count($coverage->project->package) > 0) {
            // Iterate over the package
            foreach ($coverage->project->package as $package) {
                // Then itterate on each package file
                foreach ($package->file as $packageFile) {
                    $this->printer->printOut('Checking:'.$packageFile['name']);

                    $sourceArray->add(array(
                        md5($packageFile['name']) => $this->collectFromFile($packageFile, $namespace)
                    ));
                }
            }
        }

        // In case the files are not using any namespace at all...
        // @codeCoverageIgnoreStart
        if (count($coverage->project->file) > 0) {
            // itterate over the files
            foreach ($coverage->project->file as $file) {
                $this->printer->printOut('Checking:'.$file['name']);

                $sourceArray->add(array(
                    md5($file['name']) => $this->collectFromFile($file, $namespace)
                ));
            }
        }
        // @codeCoverageIgnoreEnd

        // Last, pass the source information it it contains any information
        if ($sourceArray->count() > 0) {
            $data->set('source_files', array_values($sourceArray->all()));
        }

 		// After collect hook
        if ( ! empty($this->hook)) {
     		$data = $this->hook->afterCollect($data);
     	}

     	return $data;
    }