Skip to content

Commit f98d5c3

Browse files
author
Mike van den Hoek
committed
release: v0.1.0
1 parent a5357d9 commit f98d5c3

25 files changed

+71
-183
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## [0.1.0] - 2025-10-22
4+
5+
- Added: First commit

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This block displays an overview of all Zaken, filtered by the selected supplier
4242

4343
Enable logging to keep track of errors during communication with the ZGW supplier(s).
4444

45-
- Logs are written daily to `owc-my-services-log{-date}.json` in the plugin root directory.
45+
- Logs are written daily to `owc-my-services-log{-date}.json` in the WordPress webroot directory.
4646
- A rotating file handler keeps up to 7 log files by default, deleting the oldest as needed.
4747
- You can change the maximum number of log files using the filter described below.
4848

TODO.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# TODO
22

33
- Multiple clients for retrieving all the 'zaken'
4+
- Add CSS to the Gutenberg blocks

owc-mijn-services.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @package OWC_My_Services
99
* @author Yard | Digital Agency
10-
* @since 1.0.0
10+
* @since 0.1.0
1111
*
1212
* Plugin Name: OWC | Mijn Services
1313
* Plugin URI: https://github.com/OpenWebconcept/plugin-owc-mijn-services

phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@
5757
<rule ref="Squiz.Commenting.DocCommentAlignment" />
5858
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
5959
<rule ref="Squiz.Classes.ClassDeclaration.OpenBraceNewLine" />
60-
</ruleset>
60+
</ruleset>

src/Auth/DigiD.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @package OWC_Mijn_Services
99
* @author Yard | Digital Agency
10-
* @since 1.0.0
10+
* @since 0.1.0
1111
*/
1212

1313
namespace OWC\My_Services\Auth;
@@ -21,20 +21,16 @@
2121

2222
/**
2323
* Retrieve the social security number (BSN) by integrating with multiple DigiD authentication methods.
24+
*
25+
* @since 0.1.0
2426
*/
2527
class DigiD
2628
{
27-
/**
28-
* @since 1.0.0
29-
*/
3029
public static function make(): self
3130
{
3231
return new static();
3332
}
3433

35-
/**
36-
* @since 1.0.0
37-
*/
3834
public function bsn(): string
3935
{
4036
if ($bsn = $this->handle_digid_idp()) {
@@ -48,9 +44,6 @@ public function bsn(): string
4844
return '';
4945
}
5046

51-
/**
52-
* @since 1.0.0
53-
*/
5447
private function handle_digid_idp(): string
5548
{
5649
if ( ! class_exists( '\OWC\IdpUserData\DigiDSession' )) {
@@ -64,9 +57,6 @@ private function handle_digid_idp(): string
6457
return \OWC\IdpUserData\DigiDSession::getUserData()->getBsn();
6558
}
6659

67-
/**
68-
* @since 1.0.0
69-
*/
7060
private function handle_digid_saml(): string
7161
{
7262
if ( ! function_exists( '\\Yard\\DigiD\\Foundation\\Helpers\\resolve' )) {

src/Blocks/Block.php

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919

2020
use function OWC\ZGW\apiClientManager;
2121

22+
/**
23+
* @since 0.1.0
24+
*/
2225
abstract class Block
2326
{
2427
use Supplier;
@@ -27,9 +30,6 @@ abstract class Block
2730
protected ZakenFilter $zaken_filter;
2831
protected string $bsn;
2932

30-
/**
31-
* @since 1.0.0
32-
*/
3333
final public function render(array $attributes, string $block_content, WP_Block $block ): string
3434
{
3535
if ( ! isset( $attributes['zaakClient'] ) && $this->is_block_editor()) {
@@ -61,14 +61,8 @@ final public function render(array $attributes, string $block_content, WP_Block
6161
return $this->render_block( $attributes, $block_content, $block );
6262
}
6363

64-
/**
65-
* @since 1.0.0
66-
*/
6764
abstract protected function render_block(array $attributes, string $block_content, WP_Block $block ): string;
6865

69-
/**
70-
* @since 1.0.0
71-
*/
7266
protected function is_block_editor(): bool
7367
{
7468
global $current_screen;
@@ -80,7 +74,7 @@ protected function is_block_editor(): bool
8074
return true;
8175
}
8276

83-
if (defined( 'REST_REQUEST' ) && REST_REQUEST && isset( $_GET['context'] ) && $_GET['context'] === 'edit') {
77+
if (defined( 'REST_REQUEST' ) && REST_REQUEST && isset( $_GET['context'] ) && 'edit' === $_GET['context']) {
8478
return true;
8579
}
8680

@@ -89,8 +83,6 @@ protected function is_block_editor(): bool
8983

9084
/**
9185
* The supplier is retrieved from the requested URL therefore making it vulnerable for unwanted changes.
92-
*
93-
* @since 1.0.0
9486
*/
9587
protected function check_supplier(string $supplier ): bool
9688
{
@@ -99,18 +91,11 @@ protected function check_supplier(string $supplier ): bool
9991
return in_array( $supplier, array_keys( $suppliers ) );
10092
}
10193

102-
103-
/**
104-
* @since 1.0.0
105-
*/
10694
final protected function get_zaken(): Collection
10795
{
10896
return $this->client->zaken()->filter( $this->zaken_filter );
10997
}
11098

111-
/**
112-
* @since 1.0.0
113-
*/
11499
final protected function get_zaak_informatie_objecten(Zaak $zaak ): Collection
115100
{
116101
$filter = new ZaakinformatieobjectenFilter();

src/Blocks/MijnZaken.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
use WP_Block;
88

9+
/**
10+
* @since 0.1.0
11+
*/
912
class MijnZaken extends Block
1013
{
1114
/**

src/Blocks/Zaak.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313
use function OWC\ZGW\apiClientManager;
1414

15+
/**
16+
* @since 0.1.0
17+
*/
1518
class Zaak extends Block
1619
{
1720
/**
@@ -61,9 +64,6 @@ protected function render_block(array $attributes, string $block_content, WP_Blo
6164
);
6265
}
6366

64-
/**
65-
* @since 1.0.0
66-
*/
6767
protected function retrieve_zaak(string $identification ): ?ZaakEntity
6868
{
6969
try {

src/Bootstrap.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @package OWC_Mijn_Services
99
* @author Yard | Digital Agency
10-
* @since 1.0.0
10+
* @since 0.1.0
1111
*/
1212

1313
namespace OWC\My_Services;
@@ -31,28 +31,22 @@
3131
/**
3232
* Bootstrap providers and containers.
3333
*
34-
* @since 1.0.0
34+
* @since 0.1.0
3535
*/
3636
final class Bootstrap
3737
{
3838
/**
3939
* Dependency Injection container.
40-
*
41-
* @since 1.0.0
4240
*/
4341
private static ContainerInterface $container;
4442

4543
/**
4644
* Dependency providers.
47-
*
48-
* @since 1.0.0
4945
*/
5046
private array $providers;
5147

5248
/**
5349
* Plugin constructor.
54-
*
55-
* @since 1.0.0
5650
*/
5751
public function __construct()
5852
{
@@ -65,8 +59,6 @@ public function __construct()
6559

6660
/**
6761
* Gets all providers
68-
*
69-
* @since 1.0.0
7062
*/
7163
protected function get_providers(): array
7264
{
@@ -85,8 +77,6 @@ protected function get_providers(): array
8577

8678
/**
8779
* Registers all providers.
88-
*
89-
* @since 1.0.0
9080
*/
9181
protected function register_providers(): void
9282
{
@@ -97,8 +87,6 @@ protected function register_providers(): void
9787

9888
/**
9989
* Boots all providers.
100-
*
101-
* @since 1.0.0
10290
*/
10391
protected function boot_providers(): void
10492
{
@@ -109,8 +97,6 @@ protected function boot_providers(): void
10997

11098
/**
11199
* Builds the container.
112-
*
113-
* @since 1.0.0
114100
*/
115101
protected function build_container(): ContainerInterface
116102
{
@@ -125,9 +111,6 @@ protected function build_container(): ContainerInterface
125111
return $builder->build();
126112
}
127113

128-
/**
129-
* @since 1.0.0
130-
*/
131114
public static function get_container(): ContainerInterface
132115
{
133116
return self::$container;

0 commit comments

Comments
 (0)