@@ -53,7 +53,7 @@ use Enjoy\HttpStatusCode\Statuscodes;
5353 <?php endforeach ; ?>
5454 <?php endif ; ?>
5555 <?php endforeach ; ?>
56- <?php if (! empty ( $ this ->base_structures ) ): ?>
56+ <?php if ($ this ->base_structures !== [] ): ?>
5757 <a class="mdl-navigation__link" href="#"><strong>Objects</strong></a>
5858 <?php foreach ($ this ->base_structures as $ key => $ structure ): ?>
5959 <a class="mdl-navigation__link"
@@ -65,18 +65,18 @@ use Enjoy\HttpStatusCode\Statuscodes;
6565 <main class="mdl-layout__content main-content">
6666 <div class="page-content">
6767 <?php foreach ($ this ->categories as $ category ): ?>
68- <?php if (!empty ($ category ->title )): ?>
68+ <?php if (!is_null ($ category ->title )): ?>
6969 <h3><a id="<?= $ category ->get_href (); ?> "><?= $ category ->title ; ?> </a></h3>
7070 <?php endif ; ?>
71- <?php if (!empty ($ category ->description )): ?>
71+ <?php if (!is_null ($ category ->description )): ?>
7272 <p><?= $ category ->description ; ?> </p>
7373 <?php endif ; ?>
7474 <?php foreach ($ category ->children as $ resource ): ?>
7575 <h4>
7676 <a id="<?= str_replace ('- ' , '/ ' , $ resource ->get_href ()); ?> "><?= $ resource ->title ; ?> </a>
7777 <small><?= $ resource ->href ; ?> </small>
7878 </h4>
79- <?php if (!empty ($ resource ->description )): ?>
79+ <?php if (!is_null ($ resource ->description )): ?>
8080 <p><?= $ resource ->description ; ?> </p>
8181 <?php endif ; ?>
8282 <?php foreach ($ resource ->children as $ transition ): ?>
@@ -90,26 +90,26 @@ use Enjoy\HttpStatusCode\Statuscodes;
9090 </div>
9191 <div class="mdl-card__supporting-text">
9292 <?= $ transition ->description ; ?>
93- <?php if (!empty ($ transition ->requests ) || !empty ($ transition ->responses )): $ i = 0 ;?>
93+ <?php if (!is_null ($ transition ->requests ) || !is_null ($ transition ->responses )): $ i = 0 ;?>
9494 <div class="mdl-tabs mdl-js-tabs mdl-js-ripple-effect">
9595 <div class="mdl-tabs__tab-bar">
96- <?php if (! empty ( $ transition ->requests ) ): ?>
96+ <?php if ($ transition ->requests !== [] ): ?>
9797 <?php foreach ($ transition ->requests as $ request ): ?>
9898 <a href="#request-panel-<?= $ request ->get_id (); ?> "
9999 class="mdl-tabs__tab<?= ($ i < 1 ) ? ' is-active ' : '' ?> ">
100- <strong>Request</strong> <?= ( empty ( $ request ->title ) ? '' : ' ' . $ request ->title ) ?>
100+ <strong>Request</strong> <?= is_null ( $ request ->title ? '' : ' ' . $ request ->title ) ?>
101101 </a>
102102 <?php $ i ++; endforeach ; ?>
103103 <?php endif ; ?>
104- <?php if (! empty ( $ transition ->responses ) ): ?>
104+ <?php if ($ transition ->responses !== [] ): ?>
105105 <?php foreach ($ transition ->responses as $ response ): ?>
106106 <a href="#response-panel-<?= $ response ->get_id (); ?> "
107107 class="mdl-tabs__tab<?= ($ i < 1 ) ? ' is-active ' : '' ?> <?= $ this ->get_response_status ($ response ->statuscode ) ?> "
108108 title="<?= $ response ->statuscode . ' ' . $ this ->http_status ->getReasonPhrase ($ response ->statuscode ) ?> "><?= $ response ->statuscode ; ?> </a>
109109 <?php $ i ++; endforeach ; ?>
110110 <?php endif ; ?>
111111 </div>
112- <?php $ i = 0 ; if (!empty ( $ transition ->requests ) ): ?>
112+ <?php $ i = 0 ; if (!$ transition ->requests !== [] ): ?>
113113 <?php foreach ($ transition ->requests as $ key => $ request ): ?>
114114 <dialog class="mdl-dialog"
115115 id="mdl-dialog-<?= $ request ->get_id (); ?> ">
@@ -148,7 +148,7 @@ use Enjoy\HttpStatusCode\Statuscodes;
148148 <?php endforeach ; ?>
149149 </ul>
150150 <?php endif ; ?>
151- <?php if (! empty ( $ request ->body ) ): ?>
151+ <?php if ($ request ->body !== [] ): ?>
152152 <h5>Body</h5>
153153 <?php foreach ($ request ->body as $ value ): ?>
154154 <?php if (is_string ($ value )): ?>
@@ -161,7 +161,7 @@ use Enjoy\HttpStatusCode\Statuscodes;
161161 <?php endif ; ?>
162162 <?php endforeach ; ?>
163163 <?php endif ; ?>
164- <?php if (! empty ( $ request ->struct ) ): ?>
164+ <?php if ($ request ->struct !== [] ): ?>
165165 <h5>Structure</h5>
166166 <?= $ request ->struct ?>
167167 <?php endif ; ?>
@@ -176,7 +176,7 @@ use Enjoy\HttpStatusCode\Statuscodes;
176176 </div>
177177 <?php $ i ++; endforeach ; ?>
178178 <?php endif ; ?>
179- <?php if (! empty ( $ transition ->responses ) ): ?>
179+ <?php if ($ transition ->responses !== [] ): ?>
180180 <?php foreach ($ transition ->responses as $ key => $ response ): ?>
181181 <div class="mdl-tabs__panel <?= ($ i < 1 ) ? 'is-active ' : '' ?> "
182182 id="response-panel-<?= $ response ->get_id (); ?> ">
@@ -201,9 +201,9 @@ use Enjoy\HttpStatusCode\Statuscodes;
201201 <?php endforeach ; ?>
202202 <?php endif ; ?>
203203 <div class="mdl-grid">
204- <?php foreach ($ response ->content as $ key => $ value ): ?>
204+ <?php foreach ($ response ->content as $ response_key => $ value ): ?>
205205 <div class="mdl-cell mdl-cell--<?= 12 / count ($ response ->content ) ?> -col">
206- <h5 class="response-body"><?= $ key ; ?> </h5>
206+ <h5 class="response-body"><?= $ response_key ; ?> </h5>
207207 <pre class="response-body"
208208 id="request-<?= $ response ->get_id (); ?> "><?= $ value ; ?> </pre>
209209 </div>
@@ -240,7 +240,7 @@ use Enjoy\HttpStatusCode\Statuscodes;
240240<?php $ extras = array_filter ($ this ->base_data , function ($ value ) {
241241 return !in_array ($ value , ['HOST ' , 'TITLE ' , 'ALT_HOST ' , 'FORMAT ' , 'DESC ' , 'COLOR_1 ' , 'COLOR_2 ' ]);
242242}, ARRAY_FILTER_USE_KEY );
243- if (! empty ( $ extras) ):
243+ if ($ extras !== [] ):
244244 $ extras ['host ' ] = $ this ->base_data ['HOST ' ]; ?>
245245 <button
246246 type="button"
0 commit comments