chillerlan-QRCodeTest-Common-MaskPatternTest.html 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811
  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. <li class="phpdocumentor-topnav__menu-item -social">
  59. <a href="https://github.com/chillerlan/php-qrcode/discussions">
  60. <span>
  61. <i class="fas fa-envelope-open-text"></i>
  62. </span>
  63. </a>
  64. </li>
  65. </ul>
  66. </nav>
  67. </header>
  68. <main class="phpdocumentor">
  69. <div class="phpdocumentor-section">
  70. <input class="phpdocumentor-sidebar__menu-button" type="checkbox" id="sidebar-button" name="sidebar-button" />
  71. <label class="phpdocumentor-sidebar__menu-icon" for="sidebar-button">
  72. Menu
  73. </label>
  74. <aside class="phpdocumentor-column -three phpdocumentor-sidebar">
  75. <section class="phpdocumentor-sidebar__category -namespaces">
  76. <h2 class="phpdocumentor-sidebar__category-header">Namespaces</h2>
  77. <h4 class="phpdocumentor-sidebar__root-namespace">
  78. <a href="namespaces/chillerlan.html" class="">chillerlan</a>
  79. </h4>
  80. <ul class="phpdocumentor-list">
  81. <li>
  82. <a href="namespaces/chillerlan-qrcode.html" class="">QRCode</a>
  83. </li>
  84. <li>
  85. <a href="namespaces/chillerlan-qrcodetest.html" class="">QRCodeTest</a>
  86. </li>
  87. </ul>
  88. </section>
  89. <section class="phpdocumentor-sidebar__category -packages">
  90. <h2 class="phpdocumentor-sidebar__category-header">Packages</h2>
  91. <h4 class="phpdocumentor-sidebar__root-namespace">
  92. <a href="packages/Application.html" class="">Application</a>
  93. </h4>
  94. </section>
  95. <section class="phpdocumentor-sidebar__category -reports">
  96. <h2 class="phpdocumentor-sidebar__category-header">Reports</h2>
  97. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/deprecated.html">Deprecated</a></h3>
  98. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/errors.html">Errors</a></h3>
  99. <h3 class="phpdocumentor-sidebar__root-package"><a href="reports/markers.html">Markers</a></h3>
  100. </section>
  101. <section class="phpdocumentor-sidebar__category -indices">
  102. <h2 class="phpdocumentor-sidebar__category-header">Indices</h2>
  103. <h3 class="phpdocumentor-sidebar__root-package"><a href="indices/files.html">Files</a></h3>
  104. </section>
  105. </aside>
  106. <div class="phpdocumentor-column -nine phpdocumentor-content">
  107. <section>
  108. <ul class="phpdocumentor-breadcrumbs">
  109. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan.html">chillerlan</a></li>
  110. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest.html">QRCodeTest</a></li>
  111. <li class="phpdocumentor-breadcrumb"><a href="namespaces/chillerlan-qrcodetest-common.html">Common</a></li>
  112. </ul>
  113. <article class="phpdocumentor-element -class">
  114. <h2 class="phpdocumentor-content__title">
  115. MaskPatternTest
  116. <span class="phpdocumentor-element__extends">
  117. extends <abbr title="\PHPUnit\Framework\TestCase">TestCase</abbr>
  118. </span>
  119. <div class="phpdocumentor-element__package">
  120. in package
  121. <ul class="phpdocumentor-breadcrumbs">
  122. <li class="phpdocumentor-breadcrumb"><a href="packages/Application.html">Application</a></li>
  123. </ul>
  124. </div>
  125. </h2>
  126. <div class="phpdocumentor-label-line">
  127. <div class="phpdocumentor-label phpdocumentor-label--success"><span>Final</span><span>Yes</span></div>
  128. </div>
  129. <aside class="phpdocumentor-element-found-in">
  130. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  131. :
  132. <span class="phpdocumentor-element-found-in__line">26</span>
  133. </aside>
  134. <h5 class="phpdocumentor-tag-list__heading" id="tags">
  135. Tags
  136. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#tags" class="headerlink"><i class="fas fa-link"></i></a>
  137. </h5>
  138. <dl class="phpdocumentor-tag-list">
  139. <dt class="phpdocumentor-tag-list__entry">
  140. <span class="phpdocumentor-tag__name">see</span>
  141. </dt>
  142. <dd class="phpdocumentor-tag-list__definition">
  143. <span class="phpdocumentor-tag-link"><a href="https://github.com/zxing/zxing/blob/f4f3c2971dc794346d8b6e14752200008cb90716/core/src/test/java/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java">https://github.com/zxing/zxing/blob/f4f3c2971dc794346d8b6e14752200008cb90716/core/src/test/java/com/google/zxing/qrcode/encoder/MaskUtilTestCase.java</a></span>
  144. </dd>
  145. </dl>
  146. <h3 id="toc">
  147. Table of Contents
  148. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc" class="headerlink"><i class="fas fa-link"></i></a>
  149. </h3>
  150. <h4 id="toc-methods">
  151. Methods
  152. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc-methods" class="headerlink"><i class="fas fa-link"></i></a>
  153. </h4>
  154. <dl class="phpdocumentor-table-of-contents">
  155. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  156. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_invalidMaskPatternException">invalidMaskPatternException()</a>
  157. <span>
  158. &nbsp;: void </span>
  159. </dt>
  160. <dd>Tests if an exception is thrown on an incorrect mask pattern</dd>
  161. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  162. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_mask">mask()</a>
  163. <span>
  164. &nbsp;: void </span>
  165. </dt>
  166. <dd>Tests if the mask function generates the correct pattern</dd>
  167. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  168. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider">maskPatternProvider()</a>
  169. <span>
  170. &nbsp;: array&lt;string|int, mixed&gt; </span>
  171. </dt>
  172. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  173. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule1">penaltyRule1()</a>
  174. <span>
  175. &nbsp;: void </span>
  176. </dt>
  177. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  178. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule2">penaltyRule2()</a>
  179. <span>
  180. &nbsp;: void </span>
  181. </dt>
  182. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  183. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule3">penaltyRule3()</a>
  184. <span>
  185. &nbsp;: void </span>
  186. </dt>
  187. <dt class="phpdocumentor-table-of-contents__entry -method -public">
  188. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule4">penaltyRule4()</a>
  189. <span>
  190. &nbsp;: void </span>
  191. </dt>
  192. <dt class="phpdocumentor-table-of-contents__entry -method -private">
  193. <a class="" href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask">assertMask()</a>
  194. <span>
  195. &nbsp;: bool </span>
  196. </dt>
  197. </dl>
  198. <section class="phpdocumentor-methods">
  199. <h3 class="phpdocumentor-elements__header" id="methods">
  200. Methods
  201. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#methods" class="headerlink"><i class="fas fa-link"></i></a>
  202. </h3>
  203. <article
  204. class="phpdocumentor-element
  205. -method
  206. -public
  207. "
  208. >
  209. <h4 class="phpdocumentor-element__name" id="method_invalidMaskPatternException">
  210. invalidMaskPatternException()
  211. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_invalidMaskPatternException" class="headerlink"><i class="fas fa-link"></i></a>
  212. </h4>
  213. <aside class="phpdocumentor-element-found-in">
  214. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  215. :
  216. <span class="phpdocumentor-element-found-in__line">130</span>
  217. </aside>
  218. <p class="phpdocumentor-summary">Tests if an exception is thrown on an incorrect mask pattern</p>
  219. <code class="phpdocumentor-code phpdocumentor-signature ">
  220. <span class="phpdocumentor-signature__visibility">public</span>
  221. <span class="phpdocumentor-signature__name">invalidMaskPatternException</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  222. <div class="phpdocumentor-label-line">
  223. </div>
  224. <section class="phpdocumentor-attributes">
  225. <h5 class="phpdocumentor-elements__header" id="attributes">
  226. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_invalidMaskPatternException#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  227. </h5>
  228. <dl class="phpdocumentor-argument-list">
  229. <dt class="phpdocumentor-argument-list__entry">
  230. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  231. </dt>
  232. </dl>
  233. </section>
  234. </article>
  235. <article
  236. class="phpdocumentor-element
  237. -method
  238. -public
  239. "
  240. >
  241. <h4 class="phpdocumentor-element__name" id="method_mask">
  242. mask()
  243. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_mask" class="headerlink"><i class="fas fa-link"></i></a>
  244. </h4>
  245. <aside class="phpdocumentor-element-found-in">
  246. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  247. :
  248. <span class="phpdocumentor-element-found-in__line">103</span>
  249. </aside>
  250. <p class="phpdocumentor-summary">Tests if the mask function generates the correct pattern</p>
  251. <code class="phpdocumentor-code phpdocumentor-signature ">
  252. <span class="phpdocumentor-signature__visibility">public</span>
  253. <span class="phpdocumentor-signature__name">mask</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type">int&nbsp;</span><span class="phpdocumentor-signature__argument__name">$pattern</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, array&lt;string|int, int&gt;&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  254. <div class="phpdocumentor-label-line">
  255. </div>
  256. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  257. <dl class="phpdocumentor-argument-list">
  258. <dt class="phpdocumentor-argument-list__entry">
  259. <span class="phpdocumentor-signature__argument__name">$pattern</span>
  260. : <span class="phpdocumentor-signature__argument__return-type">int</span>
  261. </dt>
  262. <dd class="phpdocumentor-argument-list__definition">
  263. </dd>
  264. <dt class="phpdocumentor-argument-list__entry">
  265. <span class="phpdocumentor-signature__argument__name">$expected</span>
  266. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  267. </dt>
  268. <dd class="phpdocumentor-argument-list__definition">
  269. </dd>
  270. </dl>
  271. <section class="phpdocumentor-attributes">
  272. <h5 class="phpdocumentor-elements__header" id="attributes">
  273. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_mask#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  274. </h5>
  275. <dl class="phpdocumentor-argument-list">
  276. <dt class="phpdocumentor-argument-list__entry">
  277. #[<abbr title="\PHPUnit\Framework\Attributes\DataProvider">DataProvider</abbr>]
  278. </dt>
  279. <dd class="phpdocumentor-argument-list__entry">
  280. &#039;maskPatternProvider&#039;
  281. </dd>
  282. </dl>
  283. <dl class="phpdocumentor-argument-list">
  284. <dt class="phpdocumentor-argument-list__entry">
  285. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  286. </dt>
  287. </dl>
  288. </section>
  289. </article>
  290. <article
  291. class="phpdocumentor-element
  292. -method
  293. -public
  294. -static "
  295. >
  296. <h4 class="phpdocumentor-element__name" id="method_maskPatternProvider">
  297. maskPatternProvider()
  298. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider" class="headerlink"><i class="fas fa-link"></i></a>
  299. </h4>
  300. <aside class="phpdocumentor-element-found-in">
  301. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  302. :
  303. <span class="phpdocumentor-element-found-in__line">29</span>
  304. </aside>
  305. <code class="phpdocumentor-code phpdocumentor-signature ">
  306. <span class="phpdocumentor-signature__visibility">public</span>
  307. <span class="phpdocumentor-signature__static">static</span> <span class="phpdocumentor-signature__name">maskPatternProvider</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span></code>
  308. <div class="phpdocumentor-label-line">
  309. </div>
  310. <section>
  311. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  312. <span class="phpdocumentor-signature__response_type">array&lt;string|int, mixed&gt;</span>
  313. </section>
  314. </article>
  315. <article
  316. class="phpdocumentor-element
  317. -method
  318. -public
  319. "
  320. >
  321. <h4 class="phpdocumentor-element__name" id="method_penaltyRule1">
  322. penaltyRule1()
  323. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule1" class="headerlink"><i class="fas fa-link"></i></a>
  324. </h4>
  325. <aside class="phpdocumentor-element-found-in">
  326. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  327. :
  328. <span class="phpdocumentor-element-found-in__line">138</span>
  329. </aside>
  330. <code class="phpdocumentor-code phpdocumentor-signature ">
  331. <span class="phpdocumentor-signature__visibility">public</span>
  332. <span class="phpdocumentor-signature__name">penaltyRule1</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  333. <div class="phpdocumentor-label-line">
  334. </div>
  335. <section class="phpdocumentor-attributes">
  336. <h5 class="phpdocumentor-elements__header" id="attributes">
  337. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule1#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  338. </h5>
  339. <dl class="phpdocumentor-argument-list">
  340. <dt class="phpdocumentor-argument-list__entry">
  341. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  342. </dt>
  343. </dl>
  344. </section>
  345. </article>
  346. <article
  347. class="phpdocumentor-element
  348. -method
  349. -public
  350. "
  351. >
  352. <h4 class="phpdocumentor-element__name" id="method_penaltyRule2">
  353. penaltyRule2()
  354. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule2" class="headerlink"><i class="fas fa-link"></i></a>
  355. </h4>
  356. <aside class="phpdocumentor-element-found-in">
  357. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  358. :
  359. <span class="phpdocumentor-element-found-in__line">150</span>
  360. </aside>
  361. <code class="phpdocumentor-code phpdocumentor-signature ">
  362. <span class="phpdocumentor-signature__visibility">public</span>
  363. <span class="phpdocumentor-signature__name">penaltyRule2</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  364. <div class="phpdocumentor-label-line">
  365. </div>
  366. <section class="phpdocumentor-attributes">
  367. <h5 class="phpdocumentor-elements__header" id="attributes">
  368. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule2#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  369. </h5>
  370. <dl class="phpdocumentor-argument-list">
  371. <dt class="phpdocumentor-argument-list__entry">
  372. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  373. </dt>
  374. </dl>
  375. </section>
  376. </article>
  377. <article
  378. class="phpdocumentor-element
  379. -method
  380. -public
  381. "
  382. >
  383. <h4 class="phpdocumentor-element__name" id="method_penaltyRule3">
  384. penaltyRule3()
  385. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule3" class="headerlink"><i class="fas fa-link"></i></a>
  386. </h4>
  387. <aside class="phpdocumentor-element-found-in">
  388. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  389. :
  390. <span class="phpdocumentor-element-found-in__line">158</span>
  391. </aside>
  392. <code class="phpdocumentor-code phpdocumentor-signature ">
  393. <span class="phpdocumentor-signature__visibility">public</span>
  394. <span class="phpdocumentor-signature__name">penaltyRule3</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  395. <div class="phpdocumentor-label-line">
  396. </div>
  397. <section class="phpdocumentor-attributes">
  398. <h5 class="phpdocumentor-elements__header" id="attributes">
  399. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule3#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  400. </h5>
  401. <dl class="phpdocumentor-argument-list">
  402. <dt class="phpdocumentor-argument-list__entry">
  403. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  404. </dt>
  405. </dl>
  406. </section>
  407. </article>
  408. <article
  409. class="phpdocumentor-element
  410. -method
  411. -public
  412. "
  413. >
  414. <h4 class="phpdocumentor-element__name" id="method_penaltyRule4">
  415. penaltyRule4()
  416. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule4" class="headerlink"><i class="fas fa-link"></i></a>
  417. </h4>
  418. <aside class="phpdocumentor-element-found-in">
  419. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  420. :
  421. <span class="phpdocumentor-element-found-in__line">170</span>
  422. </aside>
  423. <code class="phpdocumentor-code phpdocumentor-signature ">
  424. <span class="phpdocumentor-signature__visibility">public</span>
  425. <span class="phpdocumentor-signature__name">penaltyRule4</span><span>(</span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">void</span></code>
  426. <div class="phpdocumentor-label-line">
  427. </div>
  428. <section class="phpdocumentor-attributes">
  429. <h5 class="phpdocumentor-elements__header" id="attributes">
  430. Attributes <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule4#attributes" class="headerlink"><i class="fas fa-link"></i></a>
  431. </h5>
  432. <dl class="phpdocumentor-argument-list">
  433. <dt class="phpdocumentor-argument-list__entry">
  434. #[<abbr title="\PHPUnit\Framework\Attributes\Test">Test</abbr>]
  435. </dt>
  436. </dl>
  437. </section>
  438. </article>
  439. <article
  440. class="phpdocumentor-element
  441. -method
  442. -private
  443. "
  444. >
  445. <h4 class="phpdocumentor-element__name" id="method_assertMask">
  446. assertMask()
  447. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask" class="headerlink"><i class="fas fa-link"></i></a>
  448. </h4>
  449. <aside class="phpdocumentor-element-found-in">
  450. <abbr class="phpdocumentor-element-found-in__file" title="tests/Common/MaskPatternTest.php"><a href="files/tests-common-maskpatterntest.html"><abbr title="tests/Common/MaskPatternTest.php">MaskPatternTest.php</abbr></a></abbr>
  451. :
  452. <span class="phpdocumentor-element-found-in__line">114</span>
  453. </aside>
  454. <code class="phpdocumentor-code phpdocumentor-signature ">
  455. <span class="phpdocumentor-signature__visibility">private</span>
  456. <span class="phpdocumentor-signature__name">assertMask</span><span>(</span><span class="phpdocumentor-signature__argument"><span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr>&nbsp;</span><span class="phpdocumentor-signature__argument__name">$mask</span></span><span class="phpdocumentor-signature__argument"><span>, </span><span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, array&lt;string|int, int&gt;&gt;&nbsp;</span><span class="phpdocumentor-signature__argument__name">$expected</span></span><span>)</span><span> : </span><span class="phpdocumentor-signature__response_type">bool</span></code>
  457. <div class="phpdocumentor-label-line">
  458. </div>
  459. <h5 class="phpdocumentor-argument-list__heading">Parameters</h5>
  460. <dl class="phpdocumentor-argument-list">
  461. <dt class="phpdocumentor-argument-list__entry">
  462. <span class="phpdocumentor-signature__argument__name">$mask</span>
  463. : <span class="phpdocumentor-signature__argument__return-type"><abbr title="\Closure">Closure</abbr></span>
  464. </dt>
  465. <dd class="phpdocumentor-argument-list__definition">
  466. </dd>
  467. <dt class="phpdocumentor-argument-list__entry">
  468. <span class="phpdocumentor-signature__argument__name">$expected</span>
  469. : <span class="phpdocumentor-signature__argument__return-type">array&lt;string|int, array&lt;string|int, int&gt;&gt;</span>
  470. </dt>
  471. <dd class="phpdocumentor-argument-list__definition">
  472. </dd>
  473. </dl>
  474. <section>
  475. <h5 class="phpdocumentor-return-value__heading">Return values</h5>
  476. <span class="phpdocumentor-signature__response_type">bool</span>
  477. </section>
  478. </article>
  479. </section>
  480. <div class="phpdocumentor-modal" id="source-view">
  481. <div class="phpdocumentor-modal-bg" data-exit-button></div>
  482. <div class="phpdocumentor-modal-container">
  483. <div class="phpdocumentor-modal-content">
  484. <pre style="max-height: 500px; overflow-y: scroll" data-src="files/tests/Common/MaskPatternTest.php.txt" class="language-php line-numbers linkable-line-numbers"></pre>
  485. </div>
  486. <button data-exit-button class="phpdocumentor-modal__close">&times;</button>
  487. </div>
  488. </div>
  489. <script type="text/javascript">
  490. (function () {
  491. function loadExternalCodeSnippet(el, url, line) {
  492. Array.prototype.slice.call(el.querySelectorAll('pre[data-src]')).forEach((pre) => {
  493. const src = url || pre.getAttribute('data-src').replace(/\\/g, '/');
  494. const language = 'php';
  495. const code = document.createElement('code');
  496. code.className = 'language-' + language;
  497. pre.textContent = '';
  498. pre.setAttribute('data-line', line)
  499. code.textContent = 'Loading…';
  500. pre.appendChild(code);
  501. var xhr = new XMLHttpRequest();
  502. xhr.open('GET', src, true);
  503. xhr.onreadystatechange = function () {
  504. if (xhr.readyState !== 4) {
  505. return;
  506. }
  507. if (xhr.status < 400 && xhr.responseText) {
  508. code.textContent = xhr.responseText;
  509. Prism.highlightElement(code);
  510. d=document.getElementsByClassName("line-numbers");
  511. d[0].scrollTop = d[0].children[1].offsetTop;
  512. return;
  513. }
  514. if (xhr.status === 404) {
  515. code.textContent = '✖ Error: File could not be found';
  516. return;
  517. }
  518. if (xhr.status >= 400) {
  519. code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
  520. return;
  521. }
  522. code.textContent = '✖ Error: An unknown error occurred';
  523. };
  524. xhr.send(null);
  525. });
  526. }
  527. const modalButtons = document.querySelectorAll("[data-modal]");
  528. const openedAsLocalFile = window.location.protocol === 'file:';
  529. if (modalButtons.length > 0 && openedAsLocalFile) {
  530. console.warn(
  531. 'Viewing the source code is unavailable because you are opening this page from the file:// scheme; ' +
  532. 'browsers block XHR requests when a page is opened this way'
  533. );
  534. }
  535. modalButtons.forEach(function (trigger) {
  536. if (openedAsLocalFile) {
  537. trigger.setAttribute("hidden", "hidden");
  538. }
  539. trigger.addEventListener("click", function (event) {
  540. event.preventDefault();
  541. const modal = document.getElementById(trigger.dataset.modal);
  542. if (!modal) {
  543. console.error(`Modal with id "${trigger.dataset.modal}" could not be found`);
  544. return;
  545. }
  546. modal.classList.add("phpdocumentor-modal__open");
  547. loadExternalCodeSnippet(modal, trigger.dataset.src || null, trigger.dataset.line)
  548. const exits = modal.querySelectorAll("[data-exit-button]");
  549. exits.forEach(function (exit) {
  550. exit.addEventListener("click", function (event) {
  551. event.preventDefault();
  552. modal.classList.remove("phpdocumentor-modal__open");
  553. });
  554. });
  555. });
  556. });
  557. })();
  558. </script>
  559. </article>
  560. </section>
  561. <section class="phpdocumentor-on-this-page__sidebar">
  562. <section class="phpdocumentor-on-this-page__content">
  563. <strong class="phpdocumentor-on-this-page__title">On this page</strong>
  564. <ul class="phpdocumentor-list -clean">
  565. <li class="phpdocumentor-on-this-page-section__title">Table Of Contents</li>
  566. <li>
  567. <ul class="phpdocumentor-list -clean">
  568. <li><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#toc-methods">Methods</a></li>
  569. </ul>
  570. </li>
  571. <li class="phpdocumentor-on-this-page-section__title">Methods</li>
  572. <li>
  573. <ul class="phpdocumentor-list -clean">
  574. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_invalidMaskPatternException">invalidMaskPatternException()</a></li>
  575. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_mask">mask()</a></li>
  576. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_maskPatternProvider">maskPatternProvider()</a></li>
  577. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule1">penaltyRule1()</a></li>
  578. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule2">penaltyRule2()</a></li>
  579. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule3">penaltyRule3()</a></li>
  580. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_penaltyRule4">penaltyRule4()</a></li>
  581. <li class=""><a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#method_assertMask">assertMask()</a></li>
  582. </ul>
  583. </li>
  584. </ul>
  585. </section>
  586. </section>
  587. </div>
  588. <section data-search-results class="phpdocumentor-search-results phpdocumentor-search-results--hidden">
  589. <section class="phpdocumentor-search-results__dialog">
  590. <header class="phpdocumentor-search-results__header">
  591. <h2 class="phpdocumentor-search-results__title">Search results</h2>
  592. <button class="phpdocumentor-search-results__close"><i class="fas fa-times"></i></button>
  593. </header>
  594. <section class="phpdocumentor-search-results__body">
  595. <ul class="phpdocumentor-search-results__entries"></ul>
  596. </section>
  597. </section>
  598. </section>
  599. </div>
  600. <a href="classes/chillerlan-QRCodeTest-Common-MaskPatternTest.html#top" class="phpdocumentor-back-to-top"><i class="fas fa-chevron-circle-up"></i></a>
  601. </main>
  602. <script>
  603. cssVars({});
  604. </script>
  605. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/prism.min.js"></script>
  606. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/autoloader/prism-autoloader.min.js"></script>
  607. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-numbers/prism-line-numbers.min.js"></script>
  608. <script src="https://cdn.jsdelivr.net/npm/prismjs@1.23.0/plugins/line-highlight/prism-line-highlight.min.js"></script>
  609. </body>
  610. </html>