protected static function computeDependencies(array $tables)
	{
		/** @todo vulnerable to circular dependencies */
		$result = [];
		while (!empty($tables))
		{
			// Circular dependency check variable
			$num = count($tables);

			foreach ($tables as $i => $table)
				if (!$table->dependent())
				{
					$result[] = $table;

					// Remove from list
					// and free dependent tables
					unset($tables[$i]);
					foreach ($tables as $t) $t->removeDependency($table->name());
				}
			
			// If no dependency-free table is found
			// there is probably a circular dependency
			// nothing we can do about it
			if (count($tables) === $num) return false;
		}

		return $result;
	}