Skip to content

Commit

Permalink
update version php ^8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
adereksisusanto committed Jan 13, 2025
1 parent b2809bf commit 7ce0006
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 7.4]
php: [8.0.2]
stability: [prefer-lowest, prefer-stable]

name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
Expand Down
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,6 @@ Dalam penggunaan API Dapodik berarti Anda secara sadar memberikan data individu
## Requirement
Pastikan [Dapodik](https://dapo.kemdikbud.go.id/unduhan) sudah terinstal di komputer Anda atau di VPS.

## Support us

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/dapodik-api-php.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/dapodik-api-php)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

## Installation

You can install the package via composer:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
}
],
"require": {
"php": "^7.4|^8.0",
"php": "^8.0.2",
"ext-json": "*",
"guzzlehttp/guzzle": "^7.9",
"illuminate/collections": "^8.83"
"illuminate/collections": "^9.19"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.21.1",
Expand Down
16 changes: 7 additions & 9 deletions src/Connections/RestConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Adereksisusanto\DapodikAPI\Connections;

use Adereksisusanto\DapodikAPI\Collections\Collection;
use Adereksisusanto\DapodikAPI\Contracts\RestInterface;
use Adereksisusanto\DapodikAPI\Exceptions\DapodikException;
use Adereksisusanto\DapodikAPI\Interfaces\RestInterface;
use Adereksisusanto\DapodikAPI\Response;
use GuzzleHttp\TransferStats;

Expand Down Expand Up @@ -141,14 +141,12 @@ public function pd(array $query = []): Collection
if (! isset($query['jenis'])) {
$query['jenis'] = '';
}
switch ($query['jenis']) {
case "aktif":
return new Collection($this->pdt()->toArray());
case "keluar":
return new Collection($this->pdk()->toArray());
default:
return new Collection(array_merge($this->pdt()->toArray(), $this->pdk()->toArray()));
}

return match ($query['jenis']) {
"aktif" => new Collection($this->pdt()->toArray()),
"keluar" => new Collection($this->pdk()->toArray()),
default => new Collection(array_merge($this->pdt()->toArray(), $this->pdk()->toArray())),
};
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Connections/WebServiceConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
namespace Adereksisusanto\DapodikAPI\Connections;

use Adereksisusanto\DapodikAPI\Collections\Collection;
use Adereksisusanto\DapodikAPI\Contracts\WebServiceInterface;
use Adereksisusanto\DapodikAPI\Exceptions\DapodikException;
use Adereksisusanto\DapodikAPI\Interfaces\WebServiceInterface;
use Adereksisusanto\DapodikAPI\Response;

class WebServiceConnection extends Connection implements WebServiceInterface
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Adereksisusanto\DapodikAPI\Interfaces;
namespace Adereksisusanto\DapodikAPI\Contracts;

use Doctrine\Common\Collections\Collection as DoctrineCollection;
use Doctrine\Common\Collections\Selectable as DoctrineSelectable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Adereksisusanto\DapodikAPI\Interfaces;
namespace Adereksisusanto\DapodikAPI\Contracts;

use Adereksisusanto\DapodikAPI\Collections\Collection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Adereksisusanto\DapodikAPI\Interfaces;
namespace Adereksisusanto\DapodikAPI\Contracts;

use Adereksisusanto\DapodikAPI\Collections\Collection;

Expand Down
4 changes: 2 additions & 2 deletions src/Dapodik.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Adereksisusanto\DapodikAPI\Connections\Connection;
use Adereksisusanto\DapodikAPI\Connections\RestConnection;
use Adereksisusanto\DapodikAPI\Connections\WebServiceConnection;
use Adereksisusanto\DapodikAPI\Interfaces\RestInterface;
use Adereksisusanto\DapodikAPI\Interfaces\WebServiceInterface;
use Adereksisusanto\DapodikAPI\Contracts\RestInterface;
use Adereksisusanto\DapodikAPI\Contracts\WebServiceInterface;

class Dapodik
{
Expand Down

0 comments on commit 7ce0006

Please sign in to comment.