From 9d51141c31eb7a96e50a39b9696e5c7693d58aad Mon Sep 17 00:00:00 2001
From: Sorrel Harriet <s.harriet@gold.ac.uk>
Date: Fri, 16 Sep 2016 11:32:12 +0100
Subject: [PATCH] removing swp file

---
 week-1/test_app/includes/functions.php~ | 77 -------------------------
 1 file changed, 77 deletions(-)
 delete mode 100644 week-1/test_app/includes/functions.php~

diff --git a/week-1/test_app/includes/functions.php~ b/week-1/test_app/includes/functions.php~
deleted file mode 100644
index 7d32205..0000000
--- a/week-1/test_app/includes/functions.php~
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-function formatMoney($number) {
-    $formatted = number_format($number, 2);
-return $formatted;
-}
-
-function formatAuthors($author_array) {
-    if ( count($author_array) == 1 ) {
-        return $author_array[0];
-    } elseif ( count($author_array) == 2 ) {
-        return $author_array[0] . " and " . $author_array[1];
-    } else {
-        $author_string = "";
-        for ($i=0;$i<count($author_array);$i++) {
-            if ($i==count($author_array)-2) {
-                $author_string .= " and ";
-            } elseif ( $i==count($author_array)-1) {
-                $author_string .= $author_array[$i];
-            } else {
-                $author_string .= $author_array[$i].", ";
-            }
-        }
-        return $author_string;
-    }
-}
-
-// Function to return formatted string of book fields
-function formatBook( $title, $isbn, $price, $date, $authors ) {
-
-    $book_string ='<tr>';
-
-    if (isset($title)) {
-        $book_string .= '<td>'.htmlentities($title).'</td>';
-    } else {
-        $book_string .= '<td>&nbsp;</td>';
-    }
-
-    if (isset($isbn)) {
-        $book_string .= '<td>'.htmlentities($isbn).'</td>';
-    } else {
-        $book_string .= '<td>&nbsp;</td>';
-    }
-
-    if (isset($price)) {
-        $book_string .= "<td>&pound;".htmlentities($price)."</td>";
-    } else {
-        $book_string .= '<td>&nbsp;</td>';
-    }
-
-    if (isset($date)) {
-        $date_string = formatDate($date);
-        $book_string .= "<td>".htmlentities($date_string)."</td>";
-    } else {
-        $book_string .= '<td>&nbsp;</td>';
-    }
-
-    if (isset($authors)) {
-        $author_string = formatAuthors( $authors );
-        $book_string .= "<td>".$author_string."</td>";
-    } else {
-        $book_string .= '<td>&nbsp;</td>';
-    }
-
-    $book_string .='</tr>';
-    return $book_string;
-}
-
-// Function to standardise date formats   
-function formatDate($date) {
-    $timestamp = strtotime($date);
-    $date_string = date('dS F Y', $timestamp);
-    return $date_string;
-}
-
-
-?>
-
-- 
GitLab