chillerlan-QRCodeTest-QROptionsTest.html 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Documentation</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <base href="../">
  8. <link rel="icon" href="images/favicon.ico"/>
  9. <link rel="stylesheet" href="css/normalize.css">
  10. <link rel="stylesheet" href="css/base.css">
  11. <link rel="preconnect" href="https://fonts.gstatic.com">
  12. <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@100;200;300;400;600;700&display=swap" rel="stylesheet">
  13. <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;600;700&display=swap" rel="stylesheet">
  14. <link rel="stylesheet" href="css/template.css">
  15. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0/css/all.min.css" integrity="sha256-ybRkN9dBjhcS2qrW1z+hfCxq+1aBdwyQM5wlQoQVt/0=" crossorigin="anonymous" />
  16. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/themes/prism-okaidia.css">
  17. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.css">
  18. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.css">
  19. <script src="https://cdn.jsdelivr.net/npm/fuse.js@3.4.6"></script>
  20. <script src="https://cdn.jsdelivr.net/npm/css-vars-ponyfill@2"></script>
  21. <script src="js/template.js"></script>
  22. <script src="js/search.js"></script>
  23. <script defer src="js/searchIndex.js"></script>
  24. </head>
  25. <body id="top">
  26. <header class="phpdocumentor-header phpdocumentor-section">
  27. <h1 class="phpdocumentor-title"><a href="" class="phpdocumentor-title__link">Documentation</a></h1>
  28. <input class="phpdocumentor-header__menu-button" type="checkbox" id="menu-button" name="menu-button" />
  29. <label class="phpdocumentor-header__menu-icon" for="menu-button">
  30. <i class="fas fa-bars"></i>
  31. </label>
  32. <section data-search-form class="phpdocumentor-search">
  33. <label>
  34. <span class="visually-hidden">Search for</span>
  35. <svg class="phpdocumentor-search__icon" width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">
  36. <circle cx="7.5" cy="7.5" r="6.5" stroke="currentColor" stroke-width="2"/>
  37. <line x1="12.4892" y1="12.2727" x2="19.1559" y2="18.9393" stroke="currentColor" stroke-width="3"/>
  38. </svg>
  39. <input type="search" class="phpdocumentor-field phpdocumentor-search__field" placeholder="Loading .." disabled />
  40. </label>
  41. </section>
  42. <nav class="phpdocumentor-topnav">
  43. <ul class="phpdocumentor-topnav__menu">
  44. <li class="phpdocumentor-topnav__menu-item -menu">
  45. <a href="https://php-qrcode.readthedocs.io">
  46. <span>
  47. User Manual
  48. </span>
  49. </a>
  50. </li>
  51. <li class="phpdocumentor-topnav__menu-item -social">
  52. <a href="https://github.com/chillerlan/php-qrcode">
  53. <span>
  54. <i class="fab fa-github"></i>
  55. </span>
  56. </a>
  57. </li>
  58. </ul>
  59. </nav>
  60. </header>
  61. <main class="phpdocumentor">
  62. <div class="phpdocumentor-section">
  63. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  64. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  65. Menu
  66. </label>
  67. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  68. <section class="phpdocumentor-sidebar__category">
  69. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  70. <h4 class="phpdocumentor-sidebar__root-namespace">
  71. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  72. </h4>
  73. <ul class="phpdocumentor-list">
  74. <li>
  75. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  76. </li>
  77. <li>
  78. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  79. </li>
  80. </ul>
  81. <h4 class="phpdocumentor-sidebar__root-namespace">
  82. <a href="namespaces/output.html" class="">Output</a>
  83. </h4>
  84. </section>
  85. <section class="phpdocumentor-sidebar__category">
  86. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  87. <h4 class="phpdocumentor-sidebar__root-namespace">
  88. <a href="packages/Application.html" class="">Application</a>
  89. </h4>
  90. </section>
  91. <section class="phpdocumentor-sidebar__category">
  92. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  93. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  94. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  95. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  96. </section>
  97. <section class="phpdocumentor-sidebar__category">
  98. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  100. </section>
  101. </aside>
  102. <div class="phpdocumentor-column -nine phpdocumentor-content">
  103. <section>
  104. <ul class="phpdocumentor-breadcrumbs">
  105. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  106. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a></li>
  107. </ul>
  108. <article class="phpdocumentor-element -class">
  109. <h2 class="phpdocumentor-content__title">
  110. QROptionsTest
  111. <span class="phpdocumentor-element__extends">
  112. extends <abbr title="\PHPUnit\Framework\TestCase">TestCase</abbr>
  113. </span>
  114. <div class="phpdocumentor-element__package">
  115. in package
  116. <ul class="phpdocumentor-breadcrumbs">
  117. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  118. </ul>
  119. </div>
  120. </h2>
  121. <div class="phpdocumentor-label-line">
  122. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  123. </div>
  124. <aside class="phpdocumentor-element-found-in">
  125. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  126. :
  127. <span class="phpdocumentor-element-found-in__line">23</span>
  128. </aside>
  129. <p class="phpdocumentor-summary">QROptions test</p>
  130. <h3 id="toc">
  131. Table of Contents
  132. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  133. </h3>
  134. <h4 id="toc-methods">
  135. Methods
  136. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  137. </h4>
  138. <dl class="phpdocumentor-table-of-contents">
  139. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  140. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_circleRadiusProvider">circleRadiusProvider()</a>
  141. <span>
  142. &nbsp;: array&lt;string|int, array&lt;string|int, float&gt;&gt; </span>
  143. </dt>
  144. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  145. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_logoSpaceValueProvider">logoSpaceValueProvider()</a>
  146. <span>
  147. &nbsp;: array&lt;string|int, array&lt;string|int, int&gt;&gt; </span>
  148. </dt>
  149. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  150. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_RGBProvider">RGBProvider()</a>
  151. <span>
  152. &nbsp;: array&lt;string|int, array&lt;string|int, array&lt;string|int, int&gt;&gt;&gt; </span>
  153. </dt>
  154. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  155. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampCircleRadius">testClampCircleRadius()</a>
  156. <span>
  157. &nbsp;: void </span>
  158. </dt>
  159. <dd>Tests clamping of the circle radius</dd>
  160. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  161. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampLogoSpaceValue">testClampLogoSpaceValue()</a>
  162. <span>
  163. &nbsp;: void </span>
  164. </dt>
  165. <dd>Tests the clamping (between 0 and 177) of the logo space values</dd>
  166. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  167. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testLogoSpaceStartNullable">testLogoSpaceStartNullable()</a>
  168. <span>
  169. &nbsp;: void </span>
  170. </dt>
  171. <dd>Tests if the optional logo space start values are nullable</dd>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevel">testSetEccLevel()</a>
  174. <span>
  175. &nbsp;: void </span>
  176. </dt>
  177. <dd>Tests setting the ECC level from string or int</dd>
  178. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  179. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromIntException">testSetEccLevelFromIntException()</a>
  180. <span>
  181. &nbsp;: void </span>
  182. </dt>
  183. <dd>Tests if an exception is thrown when attempting to set an invalid ECC level integer</dd>
  184. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  185. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromStringException">testSetEccLevelFromStringException()</a>
  186. <span>
  187. &nbsp;: void </span>
  188. </dt>
  189. <dd>Tests if an exception is thrown when attempting to set an invalid ECC level string</dd>
  190. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  191. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionClamp">testVersionClamp()</a>
  192. <span>
  193. &nbsp;: void </span>
  194. </dt>
  195. <dd>Tests the $version clamping</dd>
  196. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  197. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionMinMaxClamp">testVersionMinMaxClamp()</a>
  198. <span>
  199. &nbsp;: void </span>
  200. </dt>
  201. <dd>Tests the $versionMin/$versionMax clamping</dd>
  202. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  203. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionMinMaxProvider">VersionMinMaxProvider()</a>
  204. <span>
  205. &nbsp;: array&lt;string|int, array&lt;string|int, int&gt;&gt; </span>
  206. </dt>
  207. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  208. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionProvider">VersionProvider()</a>
  209. <span>
  210. &nbsp;: array&lt;string|int, array&lt;string|int, int&gt;&gt; </span>
  211. </dt>
  212. </dl>
  213. <section class="phpdocumentor-methods">
  214. <h3 class="phpdocumentor-elements__header" id="methods">
  215. Methods
  216. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  217. </h3>
  218. <article
  219. class="phpdocumentor-element
  220. -method
  221. -public
  222. -static "
  223. >
  224. <h4 class="phpdocumentor-element__name" id="method_circleRadiusProvider">
  225. circleRadiusProvider()
  226. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_circleRadiusProvider" class="headerlink"><i class="fas fa-link"></i></a>
  227. </h4>
  228. <aside class="phpdocumentor-element-found-in">
  229. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  230. :
  231. <span class="phpdocumentor-element-found-in__line">163</span>
  232. </aside>
  233. <code class="phpdocumentor-code phpdocumentor-signature ">
  234. <span class="phpdocumentor-signature__visibility">public</span>
  235. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">circleRadiusProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, float&gt;&gt;</span></code>
  236. <div class="phpdocumentor-label-line">
  237. </div>
  238. <section>
  239. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  240. <span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, float&gt;&gt;</span>
  241. </section>
  242. </article>
  243. <article
  244. class="phpdocumentor-element
  245. -method
  246. -public
  247. -static "
  248. >
  249. <h4 class="phpdocumentor-element__name" id="method_logoSpaceValueProvider">
  250. logoSpaceValueProvider()
  251. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_logoSpaceValueProvider" class="headerlink"><i class="fas fa-link"></i></a>
  252. </h4>
  253. <aside class="phpdocumentor-element-found-in">
  254. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  255. :
  256. <span class="phpdocumentor-element-found-in__line">117</span>
  257. </aside>
  258. <code class="phpdocumentor-code phpdocumentor-signature ">
  259. <span class="phpdocumentor-signature__visibility">public</span>
  260. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">logoSpaceValueProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span></code>
  261. <div class="phpdocumentor-label-line">
  262. </div>
  263. <section>
  264. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  265. <span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  266. </section>
  267. </article>
  268. <article
  269. class="phpdocumentor-element
  270. -method
  271. -public
  272. -static "
  273. >
  274. <h4 class="phpdocumentor-element__name" id="method_RGBProvider">
  275. RGBProvider()
  276. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_RGBProvider" class="headerlink"><i class="fas fa-link"></i></a>
  277. </h4>
  278. <aside class="phpdocumentor-element-found-in">
  279. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  280. :
  281. <span class="phpdocumentor-element-found-in__line">106</span>
  282. </aside>
  283. <code class="phpdocumentor-code phpdocumentor-signature ">
  284. <span class="phpdocumentor-signature__visibility">public</span>
  285. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">RGBProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, array&lt;string|int, int&gt;&gt;&gt;</span></code>
  286. <div class="phpdocumentor-label-line">
  287. </div>
  288. <section>
  289. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  290. <span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, array&lt;string|int, int&gt;&gt;&gt;</span>
  291. </section>
  292. </article>
  293. <article
  294. class="phpdocumentor-element
  295. -method
  296. -public
  297. "
  298. >
  299. <h4 class="phpdocumentor-element__name" id="method_testClampCircleRadius">
  300. testClampCircleRadius()
  301. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampCircleRadius" class="headerlink"><i class="fas fa-link"></i></a>
  302. </h4>
  303. <aside class="phpdocumentor-element-found-in">
  304. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  305. :
  306. <span class="phpdocumentor-element-found-in__line">174</span>
  307. </aside>
  308. <p class="phpdocumentor-summary">Tests clamping of the circle radius</p>
  309. <code class="phpdocumentor-code phpdocumentor-signature ">
  310. <span class="phpdocumentor-signature__visibility">public</span>
  311. <span class="phpdocumentor-signature__name">testClampCircleRadius</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">float&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  312. <div class="phpdocumentor-label-line">
  313. </div>
  314. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  315. <dl class="phpdocumentor-argument-list">
  316. <dt class="phpdocumentor-argument-list__entry">
  317. <span class="phpdocumentor-signature__argument__name">$value</span>
  318. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  319. </dt>
  320. <dd class="phpdocumentor-argument-list__definition">
  321. </dd>
  322. <dt class="phpdocumentor-argument-list__entry">
  323. <span class="phpdocumentor-signature__argument__name">$expected</span>
  324. : <span class="phpdocumentor-signature__argument__return-type">float</span>
  325. </dt>
  326. <dd class="phpdocumentor-argument-list__definition">
  327. </dd>
  328. </dl>
  329. </article>
  330. <article
  331. class="phpdocumentor-element
  332. -method
  333. -public
  334. "
  335. >
  336. <h4 class="phpdocumentor-element__name" id="method_testClampLogoSpaceValue">
  337. testClampLogoSpaceValue()
  338. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampLogoSpaceValue" class="headerlink"><i class="fas fa-link"></i></a>
  339. </h4>
  340. <aside class="phpdocumentor-element-found-in">
  341. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  342. :
  343. <span class="phpdocumentor-element-found-in__line">130</span>
  344. </aside>
  345. <p class="phpdocumentor-summary">Tests the clamping (between 0 and 177) of the logo space values</p>
  346. <code class="phpdocumentor-code phpdocumentor-signature ">
  347. <span class="phpdocumentor-signature__visibility">public</span>
  348. <span class="phpdocumentor-signature__name">testClampLogoSpaceValue</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$value</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  349. <div class="phpdocumentor-label-line">
  350. </div>
  351. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  352. <dl class="phpdocumentor-argument-list">
  353. <dt class="phpdocumentor-argument-list__entry">
  354. <span class="phpdocumentor-signature__argument__name">$value</span>
  355. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  356. </dt>
  357. <dd class="phpdocumentor-argument-list__definition">
  358. </dd>
  359. <dt class="phpdocumentor-argument-list__entry">
  360. <span class="phpdocumentor-signature__argument__name">$expected</span>
  361. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  362. </dt>
  363. <dd class="phpdocumentor-argument-list__definition">
  364. </dd>
  365. </dl>
  366. </article>
  367. <article
  368. class="phpdocumentor-element
  369. -method
  370. -public
  371. "
  372. >
  373. <h4 class="phpdocumentor-element__name" id="method_testLogoSpaceStartNullable">
  374. testLogoSpaceStartNullable()
  375. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testLogoSpaceStartNullable" class="headerlink"><i class="fas fa-link"></i></a>
  376. </h4>
  377. <aside class="phpdocumentor-element-found-in">
  378. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  379. :
  380. <span class="phpdocumentor-element-found-in__line">144</span>
  381. </aside>
  382. <p class="phpdocumentor-summary">Tests if the optional logo space start values are nullable</p>
  383. <code class="phpdocumentor-code phpdocumentor-signature ">
  384. <span class="phpdocumentor-signature__visibility">public</span>
  385. <span class="phpdocumentor-signature__name">testLogoSpaceStartNullable</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  386. <div class="phpdocumentor-label-line">
  387. </div>
  388. </article>
  389. <article
  390. class="phpdocumentor-element
  391. -method
  392. -public
  393. "
  394. >
  395. <h4 class="phpdocumentor-element__name" id="method_testSetEccLevel">
  396. testSetEccLevel()
  397. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevel" class="headerlink"><i class="fas fa-link"></i></a>
  398. </h4>
  399. <aside class="phpdocumentor-element-found-in">
  400. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  401. :
  402. <span class="phpdocumentor-element-found-in__line">73</span>
  403. </aside>
  404. <p class="phpdocumentor-summary">Tests setting the ECC level from string or int</p>
  405. <code class="phpdocumentor-code phpdocumentor-signature ">
  406. <span class="phpdocumentor-signature__visibility">public</span>
  407. <span class="phpdocumentor-signature__name">testSetEccLevel</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  408. <div class="phpdocumentor-label-line">
  409. </div>
  410. </article>
  411. <article
  412. class="phpdocumentor-element
  413. -method
  414. -public
  415. "
  416. >
  417. <h4 class="phpdocumentor-element__name" id="method_testSetEccLevelFromIntException">
  418. testSetEccLevelFromIntException()
  419. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromIntException" class="headerlink"><i class="fas fa-link"></i></a>
  420. </h4>
  421. <aside class="phpdocumentor-element-found-in">
  422. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  423. :
  424. <span class="phpdocumentor-element-found-in__line">86</span>
  425. </aside>
  426. <p class="phpdocumentor-summary">Tests if an exception is thrown when attempting to set an invalid ECC level integer</p>
  427. <code class="phpdocumentor-code phpdocumentor-signature ">
  428. <span class="phpdocumentor-signature__visibility">public</span>
  429. <span class="phpdocumentor-signature__name">testSetEccLevelFromIntException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  430. <div class="phpdocumentor-label-line">
  431. </div>
  432. </article>
  433. <article
  434. class="phpdocumentor-element
  435. -method
  436. -public
  437. "
  438. >
  439. <h4 class="phpdocumentor-element__name" id="method_testSetEccLevelFromStringException">
  440. testSetEccLevelFromStringException()
  441. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromStringException" class="headerlink"><i class="fas fa-link"></i></a>
  442. </h4>
  443. <aside class="phpdocumentor-element-found-in">
  444. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  445. :
  446. <span class="phpdocumentor-element-found-in__line">96</span>
  447. </aside>
  448. <p class="phpdocumentor-summary">Tests if an exception is thrown when attempting to set an invalid ECC level string</p>
  449. <code class="phpdocumentor-code phpdocumentor-signature ">
  450. <span class="phpdocumentor-signature__visibility">public</span>
  451. <span class="phpdocumentor-signature__name">testSetEccLevelFromStringException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  452. <div class="phpdocumentor-label-line">
  453. </div>
  454. </article>
  455. <article
  456. class="phpdocumentor-element
  457. -method
  458. -public
  459. "
  460. >
  461. <h4 class="phpdocumentor-element__name" id="method_testVersionClamp">
  462. testVersionClamp()
  463. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionClamp" class="headerlink"><i class="fas fa-link"></i></a>
  464. </h4>
  465. <aside class="phpdocumentor-element-found-in">
  466. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  467. :
  468. <span class="phpdocumentor-element-found-in__line">40</span>
  469. </aside>
  470. <p class="phpdocumentor-summary">Tests the $version clamping</p>
  471. <code class="phpdocumentor-code phpdocumentor-signature ">
  472. <span class="phpdocumentor-signature__visibility">public</span>
  473. <span class="phpdocumentor-signature__name">testVersionClamp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$version</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  474. <div class="phpdocumentor-label-line">
  475. </div>
  476. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  477. <dl class="phpdocumentor-argument-list">
  478. <dt class="phpdocumentor-argument-list__entry">
  479. <span class="phpdocumentor-signature__argument__name">$version</span>
  480. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  481. </dt>
  482. <dd class="phpdocumentor-argument-list__definition">
  483. </dd>
  484. <dt class="phpdocumentor-argument-list__entry">
  485. <span class="phpdocumentor-signature__argument__name">$expected</span>
  486. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  487. </dt>
  488. <dd class="phpdocumentor-argument-list__definition">
  489. </dd>
  490. </dl>
  491. </article>
  492. <article
  493. class="phpdocumentor-element
  494. -method
  495. -public
  496. "
  497. >
  498. <h4 class="phpdocumentor-element__name" id="method_testVersionMinMaxClamp">
  499. testVersionMinMaxClamp()
  500. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionMinMaxClamp" class="headerlink"><i class="fas fa-link"></i></a>
  501. </h4>
  502. <aside class="phpdocumentor-element-found-in">
  503. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  504. :
  505. <span class="phpdocumentor-element-found-in__line">62</span>
  506. </aside>
  507. <p class="phpdocumentor-summary">Tests the $versionMin/$versionMax clamping</p>
  508. <code class="phpdocumentor-code phpdocumentor-signature ">
  509. <span class="phpdocumentor-signature__visibility">public</span>
  510. <span class="phpdocumentor-signature__name">testVersionMinMaxClamp</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$versionMin</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$versionMax</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expectedMin</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expectedMax</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  511. <div class="phpdocumentor-label-line">
  512. </div>
  513. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  514. <dl class="phpdocumentor-argument-list">
  515. <dt class="phpdocumentor-argument-list__entry">
  516. <span class="phpdocumentor-signature__argument__name">$versionMin</span>
  517. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  518. </dt>
  519. <dd class="phpdocumentor-argument-list__definition">
  520. </dd>
  521. <dt class="phpdocumentor-argument-list__entry">
  522. <span class="phpdocumentor-signature__argument__name">$versionMax</span>
  523. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  524. </dt>
  525. <dd class="phpdocumentor-argument-list__definition">
  526. </dd>
  527. <dt class="phpdocumentor-argument-list__entry">
  528. <span class="phpdocumentor-signature__argument__name">$expectedMin</span>
  529. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  530. </dt>
  531. <dd class="phpdocumentor-argument-list__definition">
  532. </dd>
  533. <dt class="phpdocumentor-argument-list__entry">
  534. <span class="phpdocumentor-signature__argument__name">$expectedMax</span>
  535. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  536. </dt>
  537. <dd class="phpdocumentor-argument-list__definition">
  538. </dd>
  539. </dl>
  540. </article>
  541. <article
  542. class="phpdocumentor-element
  543. -method
  544. -public
  545. -static "
  546. >
  547. <h4 class="phpdocumentor-element__name" id="method_VersionMinMaxProvider">
  548. VersionMinMaxProvider()
  549. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionMinMaxProvider" class="headerlink"><i class="fas fa-link"></i></a>
  550. </h4>
  551. <aside class="phpdocumentor-element-found-in">
  552. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  553. :
  554. <span class="phpdocumentor-element-found-in__line">50</span>
  555. </aside>
  556. <code class="phpdocumentor-code phpdocumentor-signature ">
  557. <span class="phpdocumentor-signature__visibility">public</span>
  558. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">VersionMinMaxProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span></code>
  559. <div class="phpdocumentor-label-line">
  560. </div>
  561. <section>
  562. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  563. <span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  564. </section>
  565. </article>
  566. <article
  567. class="phpdocumentor-element
  568. -method
  569. -public
  570. -static "
  571. >
  572. <h4 class="phpdocumentor-element__name" id="method_VersionProvider">
  573. VersionProvider()
  574. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionProvider" class="headerlink"><i class="fas fa-link"></i></a>
  575. </h4>
  576. <aside class="phpdocumentor-element-found-in">
  577. <abbr class="phpdocumentor-element-found-in__file" title="tests/QROptionsTest.php"><a href="files/tests-qroptionstest.html"><abbr title="tests/QROptionsTest.php">QROptionsTest.php</abbr></a></abbr>
  578. :
  579. <span class="phpdocumentor-element-found-in__line">28</span>
  580. </aside>
  581. <code class="phpdocumentor-code phpdocumentor-signature ">
  582. <span class="phpdocumentor-signature__visibility">public</span>
  583. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">VersionProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span></code>
  584. <div class="phpdocumentor-label-line">
  585. </div>
  586. <section>
  587. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  588. <span class="phpdocumentor-signature__response_type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  589. </section>
  590. </article>
  591. </section>
  592. <div class="phpdocumentor-modal" id="source-view">
  593. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  594. <div class="phpdocumentor-modal-container">
  595. <div class="phpdocumentor-modal-content">
  596. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/QROptionsTest.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  597. </div>
  598. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  599. </div>
  600. </div>
  601. <script type="text/javascript">
  602. (function () {
  603. function loadExternalCodeSnippet(el, url, line) {
  604. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  605. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  606. const language = 'php';
  607. const code = document.createElement('code');
  608. code.className = 'language-' + language;
  609. pre.textContent = '';
  610. pre.setAttribute('data-line', line)
  611. code.textContent = 'Loading…';
  612. pre.appendChild(code);
  613. var xhr = new XMLHttpRequest();
  614. xhr.open('GET', src, true);
  615. xhr.onreadystatechange = function () {
  616. if (xhr.readyState !== 4) {
  617. return;
  618. }
  619. if (xhr.status < 400 && xhr.responseText) {
  620. code.textContent = xhr.responseText;
  621. Prism.highlightElement(code);
  622. return;
  623. }
  624. if (xhr.status === 404) {
  625. code.textContent = '✖ Error: File could not be found';
  626. return;
  627. }
  628. if (xhr.status >= 400) {
  629. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  630. return;
  631. }
  632. code.textContent = '✖ Error: An unknown error occurred';
  633. };
  634. xhr.send(null);
  635. });
  636. }
  637. const modalButtons = document.querySelectorAll("[data-modal]");
  638. const openedAsLocalFile = window.location.protocol === 'file:';
  639. if (modalButtons.length > 0 && openedAsLocalFile) {
  640. console.warn(
  641. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  642. 'browsers block XHR requests when a page is opened this way'
  643. );
  644. }
  645. modalButtons.forEach(function (trigger) {
  646. if (openedAsLocalFile) {
  647. trigger.setAttribute("hidden", "hidden");
  648. }
  649. trigger.addEventListener("click", function (event) {
  650. event.preventDefault();
  651. const modal = document.getElementById(trigger.dataset.modal);
  652. if (!modal) {
  653. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  654. return;
  655. }
  656. modal.classList.add("phpdocumentor-modal__open");
  657. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  658. const exits = modal.querySelectorAll("[data-exit-button]");
  659. exits.forEach(function (exit) {
  660. exit.addEventListener("click", function (event) {
  661. event.preventDefault();
  662. modal.classList.remove("phpdocumentor-modal__open");
  663. });
  664. });
  665. });
  666. });
  667. })();
  668. </script>
  669. </article>
  670. </section>
  671. <section class="phpdocumentor-on-this-page__sidebar">
  672. <section class="phpdocumentor-on-this-page__content">
  673. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  674. <ul class="phpdocumentor-list -clean">
  675. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  676. <li>
  677. <ul class="phpdocumentor-list -clean">
  678. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#toc-methods">Methods</a></li>
  679. </ul>
  680. </li>
  681. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  682. <li>
  683. <ul class="phpdocumentor-list -clean">
  684. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_circleRadiusProvider">circleRadiusProvider()</a></li>
  685. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_logoSpaceValueProvider">logoSpaceValueProvider()</a></li>
  686. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_RGBProvider">RGBProvider()</a></li>
  687. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampCircleRadius">testClampCircleRadius()</a></li>
  688. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testClampLogoSpaceValue">testClampLogoSpaceValue()</a></li>
  689. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testLogoSpaceStartNullable">testLogoSpaceStartNullable()</a></li>
  690. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevel">testSetEccLevel()</a></li>
  691. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromIntException">testSetEccLevelFromIntException()</a></li>
  692. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testSetEccLevelFromStringException">testSetEccLevelFromStringException()</a></li>
  693. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionClamp">testVersionClamp()</a></li>
  694. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_testVersionMinMaxClamp">testVersionMinMaxClamp()</a></li>
  695. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionMinMaxProvider">VersionMinMaxProvider()</a></li>
  696. <li><a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#method_VersionProvider">VersionProvider()</a></li>
  697. </ul>
  698. </li>
  699. </ul>
  700. </section>
  701. </section>
  702. </div>
  703. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  704. <section class="phpdocumentor-search-results__dialog">
  705. <header class="phpdocumentor-search-results__header">
  706. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  707. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  708. </header>
  709. <section class="phpdocumentor-search-results__body">
  710. <ul class="phpdocumentor-search-results__entries"></ul>
  711. </section>
  712. </section>
  713. </section>
  714. </div>
  715. <a href="classes/chillerlan-QRCodeTest-QROptionsTest.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  716. </main>
  717. <script>
  718. cssVars({});
  719. </script>
  720. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  721. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  722. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  723. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  724. </body>
  725. </html>