Skip to content

Commit

Permalink
(#438) perbaikan code
Browse files Browse the repository at this point in the history
  • Loading branch information
totoprayogo1916 authored Aug 16, 2023
1 parent 17d3587 commit 11e598b
Show file tree
Hide file tree
Showing 105 changed files with 1,036 additions and 1,295 deletions.
23 changes: 12 additions & 11 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.php-cs-fixer.php export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitmodules export-ignore
.php-cs-fixer.php export-ignore
code_of_conduct.md export-ignore
composer.lock export-ignore
package-lock.json export-ignore
package.json export-ignore
vite.config.js export-ignore
composer.lock export-ignore
package-lock.json export-ignore
package.json export-ignore
rector.php export-ignore
vite.config.js export-ignore

.github/ export-ignore
docs/ export-ignore
.github/ export-ignore
docs/ export-ignore
resources/ export-ignore
8 changes: 6 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
},
"require-dev": {
"codeigniter/coding-standard": "^1.1",
"mikey179/vfsstream": "1.6.*"
"mikey179/vfsstream": "1.6.*",
"rector/rector": "0.17.13"
},
"autoload": {
"psr-4": {
Expand All @@ -26,7 +27,10 @@
"vendor-dir": "donjo-sys"
},
"scripts": {
"csfix": "./donjo-sys/bin/php-cs-fixer fix",
"csfix": [
"./donjo-sys/bin/php-cs-fixer fix",
"./donjo-sys/bin/rector process"
],
"update-resources": "git submodule update --init --remote resources"
}
}
120 changes: 119 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion donjo-app/Libraries/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function cek(): bool
$query = $this->CI->db->query($sql, $db);
$data = $query->result_array();

return ! (count($data) !== 77);
return ! ((is_countable($data) ? count($data) : 0) !== 77);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion donjo-app/Libraries/Paging.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Paging

public function __construct($props = [])
{
if (count($props) > 0) {
if ((is_countable($props) ? count($props) : 0) > 0) {
$this->init($props);
}
}
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_grafik.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class Analisis_grafik extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_indikator.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_indikator extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_kategori.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_kategori extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_klasifikasi.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class Analisis_klasifikasi extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down
6 changes: 2 additions & 4 deletions donjo-app/controllers/Analisis_laporan.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_laporan extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down Expand Up @@ -158,15 +156,15 @@ public function multi_jawab_proses()

$id_cb = $_POST['id_cb'];
$cb = '';
if (count($id_cb)) {
if (is_countable($id_cb) ? count($id_cb) : 0) {
foreach ($id_cb as $id) {
$cb .= $id . ',';
}
}
$_SESSION['jawab'] = $cb . '7777777';

$jmkf = $this->analisis_laporan_model->group_parameter();
$_SESSION['jmkf'] = count($jmkf);
$_SESSION['jmkf'] = is_countable($jmkf) ? count($jmkf) : 0;
}
redirect('analisis_laporan');
}
Expand Down
2 changes: 1 addition & 1 deletion donjo-app/controllers/Analisis_master.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function panduan()

public function import_analisis()
{
$header = $this->header_model->get_data();
$this->header_model->get_data();

$nav['act'] = 1;
$data['form_action'] = site_url('analisis_master/import');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_periode.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_periode extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Analisis_respon.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_respon extends BaseController
{
public function __construct()
{
parent::__construct();

unset($_SESSION['delik']);
$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
Expand Down
6 changes: 2 additions & 4 deletions donjo-app/controllers/Analisis_statistik_jawaban.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Analisis_statistik_jawaban extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand Down Expand Up @@ -166,7 +164,7 @@ public function grafik_parameter($id = '')
}
$data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun();

$ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id);
$this->analisis_statistik_jawaban_model->get_analisis_indikator($id);

// redirect('analisis_statistik_jawaban');

Expand Down Expand Up @@ -207,7 +205,7 @@ public function subjek_parameter($id = '', $par = '')
}
$data['list_dusun'] = $this->analisis_statistik_jawaban_model->list_dusun();

$ai = $this->analisis_statistik_jawaban_model->get_analisis_indikator($id);
$this->analisis_statistik_jawaban_model->get_analisis_indikator($id);
// if($ai['id_tipe']==3 OR $ai['id_tipe']==4)
// redirect('analisis_statistik_jawaban');

Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Data_persil.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class Data_persil extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1' && $grup !== '2') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Database extends BaseController
{
public function __construct()
{
parent::__construct();

$this->load->dbforge();
$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Dokumen.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Dokumen extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1' && $grup !== '2' && $grup !== '3' && $grup !== '4') {
redirect('siteman');
Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/First.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class First extends BaseController
{
public function __construct()
{
parent::__construct();

mandiri_timeout();
}

Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Gallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Gallery extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1' && $grup !== '2' && $grup !== '3' && $grup !== '4') {
redirect('siteman');
Expand Down
4 changes: 0 additions & 4 deletions donjo-app/controllers/Gis.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class Gis extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1') {
redirect('siteman');
Expand All @@ -18,8 +16,6 @@ public function __construct()
public function clear()
{
unset($_SESSION['log'], $_SESSION['cari'], $_SESSION['filter'], $_SESSION['sex'], $_SESSION['warganegara'], $_SESSION['fisik'], $_SESSION['mental'], $_SESSION['menahun'], $_SESSION['golongan_darah'], $_SESSION['dusun'], $_SESSION['rw'], $_SESSION['rt'], $_SESSION['agama'], $_SESSION['umur_min'], $_SESSION['umur_max'], $_SESSION['pekerjaan_id'], $_SESSION['status'], $_SESSION['pendidikan_id'], $_SESSION['status_penduduk'], $_SESSION['layer_penduduk'], $_SESSION['layer_keluarga'], $_SESSION['layer_desa'], $_SESSION['layer_wilayah'], $_SESSION['layer_area'], $_SESSION['layer_line'], $_SESSION['layer_point']);

$_SESSION['layer_keluarga'] === 0;
redirect('gis');
}

Expand Down
2 changes: 0 additions & 2 deletions donjo-app/controllers/Hom_desa.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ class Hom_desa extends BaseController
{
public function __construct()
{
parent::__construct();

$grup = $this->user_model->sesi_grup($_SESSION['sesi']);
if ($grup !== '1' && $grup !== '2') {
redirect('siteman');
Expand Down
Loading

0 comments on commit 11e598b

Please sign in to comment.