Skip to content

Commit

Permalink
Fixed overal spacing and indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mehdi Mehtarizadeh committed Mar 3, 2022
1 parent a25a7f9 commit e46678a
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions app/Controllers/Source.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,24 @@ class Source extends CVUI_Controller{
* Constructor
*
*/
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger){
public function initController(\CodeIgniter\HTTP\RequestInterface $request, \CodeIgniter\HTTP\ResponseInterface $response, \Psr\Log\LoggerInterface $logger)
{
parent::setProtected(true);
parent::setIsAdmin(true);
parent::initController($request, $response, $logger);

$this->validation = Services::validation();
$this->sourceModel = new \App\Models\Source();
helper('filesystem');

}

public function Index(){
public function Index()
{
return redirect()->to(base_url($this->controllerName.'/List'));
}

public function List() {

public function List()
{
$uidata = new UIData();
$uidata->title = "Sources";

Expand Down Expand Up @@ -98,8 +99,8 @@ public function List() {
return view($this->viewDirectory.'/List', $data);
}

public function Create() {

public function Create()
{
$uidata = new UIData();
$uidata->stickyFooter = false;

Expand Down Expand Up @@ -325,8 +326,8 @@ public function Create() {
}
}

public function Update(int $source_id = null) {

public function Update(int $source_id = null)
{
$uidata = new UIData();
$uidata->stickyFooter = false;

Expand Down Expand Up @@ -572,8 +573,10 @@ public function Update(int $source_id = null) {
}
}

public function Delete(int $source_id = Null) {
if ($source_id == Null) {
public function Delete(int $source_id = Null)
{
if ($source_id == Null)
{
return redirect()->to(base_url($this->controllerName.'/List'));
}

Expand Down Expand Up @@ -659,7 +662,8 @@ public function Delete(int $source_id = Null) {
else
{
$source = $this->sourceModel->getSource($source_id);
if ($source) {
if ($source)
{
$uidata->data['source_id'] = $source_id;
$uidata->data['source_name'] = $source['name'];
$uidata->data['confirm'] = array(
Expand Down

0 comments on commit e46678a

Please sign in to comment.