PHP code example of yudiandela / garjas

1. Go to this page and download the library: Download yudiandela/garjas library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yudiandela / garjas example snippets


composer 



use Yudiandela\Garjas\Perhitungan\BMI;

[$beratBadan, $tinggiBadan] = [50, 150];
$bmi = BMI::check($beratBadan, $tinggiBadan);

[
    'kategori' => 'HB (Harmonis Bawah)',
    'range_bmi' => '21.2 - 22.4',
    'bmi' => 22.22
]



use Yudiandela\Garjas\Perhitungan\KategoriUmur;

$umur = 36;
$kategori = KategoriUmur::check($umur);

4



use Yudiandela\Garjas\Perhitungan\Lari12Menit;

$data = [
    'jenis_kelamin' => 'pria',
    'umur' => 36,
    'lari' => 2345
];
$nilai = Lari12Menit::check($data['umur'], $data['jenis_kelamin'], $data['lari']);

[
    'lari_12_menit' => 2345.0,
    'nilai' => 53
]



use Yudiandela\Garjas\Perhitungan\PullUp;

$data = [
    'jenis_kelamin' => 'pria',
    'umur' => 36,
    'pull_up' => 9
];
$nilai = PullUp::check($data['umur'], $data['jenis_kelamin'], $data['pull_up']);

[
    'pull_up_1_menit' => 9.0,
    'nilai' => 70
]



use Yudiandela\Garjas\Perhitungan\SitUp;

$data = [
    'jenis_kelamin' => 'pria',
    'umur' => 36,
    'sit_up' => 30,
];
$nilai = SitUp::check($data['umur'], $data['jenis_kelamin'], $data['sit_up']);

[
    'sit_up_1_menit' => 30.0,
    'nilai' => 64
]



use Yudiandela\Garjas\Perhitungan\PushUp;

$data = [
    'jenis_kelamin' => 'pria',
    'umur' => 36,
    'push_up' => 18
];
$nilai = PushUp::check($data['umur'], $data['jenis_kelamin'], $data['push_up']);

[
    'push_up_1_menit' => 18.0,
    'nilai' => 22
]



use Yudiandela\Garjas\Perhitungan\ShuttleRun;

$data = [
    'jenis_kelamin' => 'pria',
    'umur' => 36,
    'shuttle_run' => 22.00
];
$nilai = ShuttleRun::check($data['umur'], $data['jenis_kelamin'], $data['shuttle_run']);

[
    'shuttle_run' => 22.0,
    'nilai' => 54
]

composer test