Whitespace cleanup
This commit is contained in:
parent
a16e5f2479
commit
04af074849
@ -1,14 +1,14 @@
|
|||||||
<?php
|
<?php
|
||||||
class Ajax extends Responder {
|
class Ajax extends Responder {
|
||||||
private $action = '';
|
private $action = '';
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
if(isset($_GET['action'])) {
|
if(isset($_GET['action'])) {
|
||||||
$this->action = $_GET['action'];
|
$this->action = $_GET['action'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function render() {
|
public function render() {
|
||||||
$out = '';
|
$out = '';
|
||||||
switch($this->action) {
|
switch($this->action) {
|
||||||
@ -98,7 +98,7 @@ class Ajax extends Responder {
|
|||||||
return new Failure('Artikeln är redan utlånad.');
|
return new Failure('Artikeln är redan utlånad.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function return_product() {
|
private function return_product() {
|
||||||
$product = null;
|
$product = null;
|
||||||
try {
|
try {
|
||||||
@ -138,7 +138,7 @@ class Ajax extends Responder {
|
|||||||
}
|
}
|
||||||
return new Failure('Lån saknas.');
|
return new Failure('Lån saknas.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function start_inventory() {
|
private function start_inventory() {
|
||||||
try {
|
try {
|
||||||
Inventory::begin();
|
Inventory::begin();
|
||||||
@ -147,7 +147,7 @@ class Ajax extends Responder {
|
|||||||
return new Failure('Inventering redan igång.');
|
return new Failure('Inventering redan igång.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function end_inventory() {
|
private function end_inventory() {
|
||||||
$inventory = Inventory::get_active();
|
$inventory = Inventory::get_active();
|
||||||
if($inventory === null) {
|
if($inventory === null) {
|
||||||
@ -156,7 +156,7 @@ class Ajax extends Responder {
|
|||||||
$inventory->end();
|
$inventory->end();
|
||||||
return new Success('Inventering avslutad.');
|
return new Success('Inventering avslutad.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function inventory_product() {
|
private function inventory_product() {
|
||||||
$inventory = Inventory::get_active();
|
$inventory = Inventory::get_active();
|
||||||
if($inventory === null) {
|
if($inventory === null) {
|
||||||
@ -273,7 +273,7 @@ class Ajax extends Responder {
|
|||||||
}
|
}
|
||||||
return new Success('Ändringarna sparade.');
|
return new Success('Ändringarna sparade.');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function update_user() {
|
private function update_user() {
|
||||||
$id = $_POST['id'];
|
$id = $_POST['id'];
|
||||||
$name = $_POST['name'];
|
$name = $_POST['name'];
|
||||||
@ -355,7 +355,7 @@ class Ajax extends Responder {
|
|||||||
return new Failure('Det finns ingen mall med det namnet.');
|
return new Failure('Det finns ingen mall med det namnet.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function suggest() {
|
private function suggest() {
|
||||||
return new Success(suggest($_POST['type']));
|
return new Success(suggest($_POST['type']));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user