private function _getAllPhpFiles($src, $excludes, $dir = '') {
		$files = array();
		if (!is_dir($src)) {

			// Source is a file
			$isExcluded = false;
			foreach ($excludes as $patternExcluded) {
				if (strstr($src, $patternExcluded)) {
					$isExcluded = true;
				}
			}
			if (!$isExcluded) {
				$files[] = $src;
			}
		} else {
			// Source is a directory
			$root = opendir($src);
			if ($root) {
				while ($file = readdir($root)) {
					if ($this->_inArray($file, $this->ignoredFiles)) {
						continue;
					}

					$fullPath = $src . "/" . $file;
					$isExcluded = false;
					foreach ($excludes as $patternExcluded) {
						if (strstr($fullPath, $patternExcluded)) {
							$isExcluded = true;
						}
					}

					if (!$isExcluded) {
						if (is_dir($src . "/" . $file)) {
							$filesToMerge = $this->_getAllPhpFiles($src . "/" . $file, $excludes, $dir . '/' . $file);
							$files = array_merge($files, $filesToMerge);
						} else {
							$pathParts = pathinfo($file);
							if (array_key_exists('extension', $pathParts)) {
								if (in_array($pathParts['extension'], $this->validExtensions)) {
									$files[] = realpath($src . "/" . $file);
								}
							}
						}
					}
				}
			}
		}

		return $files;
	}