1919
2020use function OWC \ZGW \apiClientManager ;
2121
22+ /**
23+ * @since 0.1.0
24+ */
2225abstract 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 ();
0 commit comments