[{"data":1,"prerenderedAt":3871},["ShallowReactive",2],{"/php/phpstan/":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"head":10,"created":25,"tags":29,"chapters":34,"thumb":36,"contact":37,"feedback":37,"lead":37,"list":37,"index":37,"sitemap":37,"featured":37,"body":38,"_type":3865,"_id":3866,"_source":3867,"_file":3868,"_stem":3869,"_extension":3870},"/php/phpstan","php",false,"","How to Find Bugs Faster with PHP Stan?","Let me introduce you to PHPStan - a powerful tool that helps detect bugs before they reach production.",{"title":11,"link":12,"meta":16},"How to Find Bugs Faster with PHP Stan? | pragmate.dev",[13],{"rel":14,"href":15},"canonical","https://pragmate.dev/php/phpstan/",[17,20,23,26],{"name":18,"content":19},"twitter:creator","@przemekhernik",{"name":21,"content":22},"author","Przemysław Hernik",{"name":24,"content":25},"article:published_time","2026-06-19",{"name":27,"content":28},"og:image","https://cdn.pragmate.dev/wp-content/uploads/2026/06/8fb0c872-0dd5-4b4a-964c-11fc41208a28.jpg",{"time":30,"level":31,"stack":32},"12 min","Easy",[33],"WordPress",[35],"/php/phpstan/","bug",true,{"type":39,"children":40,"toc":3848},"root",[41,48,63,67,71,78,98,107,110,116,128,589,601,751,1157,1570,1967,2371,2381,2388,2393,2405,2412,2415,2421,2445,2477,2480,2486,2515,2585,2590,2611,2775,2778,2784,2813,2889,2908,2911,2917,2922,3008,3069,3072,3078,3096,3103,3121,3163,3190,3282,3287,3294,3334,3450,3460,3466,3469,3475,3509,3536,3673,3685,3688,3694,3734,3739,3742,3748,3753,3759,3788,3795,3825,3828,3842],{"type":42,"tag":43,"props":44,"children":47},"element","prose-video",{"thumbnail":45,"url":46},"https://cdn.pragmate.dev/wp-content/uploads/2025/06/ace48c83-3347-4564-9a50-21daf3f42de7.jpg","https://www.youtube-nocookie.com/embed/mgqME63kcLM",[],{"type":42,"tag":49,"props":50,"children":51},"p",{},[52,55,61],{"type":53,"value":54},"text","I was wondering how to best introduce this tool to you. After some thought, I realized the best way is to let the creators speak for themselves. So, let me introduce you to ",{"type":42,"tag":56,"props":57,"children":58},"strong",{},[59],{"type":53,"value":60},"PHPStan - powerful tool that helps detect bugs before they reach production",{"type":53,"value":62},".",{"type":42,"tag":64,"props":65,"children":66},"cta",{},[],{"type":42,"tag":68,"props":69,"children":70},"hr",{},[],{"type":42,"tag":72,"props":73,"children":75},"h2",{"id":74},"whats-php-stan",[76],{"type":53,"value":77},"What’s PHP Stan?",{"type":42,"tag":49,"props":79,"children":80},{},[81,83,88,90,97],{"type":53,"value":82},"PHPStan is a tool that helps identify issues in PHP code. ",{"type":42,"tag":56,"props":84,"children":85},{},[86],{"type":53,"value":87},"It checks the codebase for syntax mistakes, type errors, or incorrect function calls, analyzes the data flow, and looks for unused code or missing return statements.",{"type":53,"value":89}," It works best with object-oriented strongly typed or well-annotated code, so that's another reason why it's worth ",{"type":42,"tag":91,"props":92,"children":94},"a",{"href":93},"/wordpress/architecture/oop-vs-procedural/#object-oriented-approach-in-wordpress",[95],{"type":53,"value":96},"giving OOP a spin",{"type":53,"value":62},{"type":42,"tag":49,"props":99,"children":100},{},[101],{"type":42,"tag":102,"props":103,"children":106},"img",{"alt":104,"src":105},"Image","https://cdn.pragmate.dev/wp-content/uploads/2025/02/53d2ab5d-5bfc-4062-b548-4351ab23d3ae.png",[],{"type":42,"tag":68,"props":108,"children":109},{},[],{"type":42,"tag":72,"props":111,"children":113},{"id":112},"why-to-use-php-stan",[114],{"type":53,"value":115},"Why to Use PHP Stan?",{"type":42,"tag":49,"props":117,"children":118},{},[119,121,126],{"type":53,"value":120},"Let's run a quick test. ",{"type":42,"tag":56,"props":122,"children":123},{},[124],{"type":53,"value":125},"How many issues can you spot in this code within 10 seconds?",{"type":53,"value":127}," If you find at least two, you're on the right track. However, there are many more to uncover 🫷",{"type":42,"tag":129,"props":130,"children":133},"pre",{"className":131,"code":132,"language":5,"meta":7,"style":7},"language-php shiki shiki-themes one-dark-pro","namespace FM;\n\nclass Test\n{\n    public function __construct()\n    {\n        $this->call();\n    }\n\n    private function log(string $message): void\n    {\n        error_log($message);\n    }\n\n    private function call()\n    {\n        $this->log(1);\n\n        return get_posts(1);\n    }\n\n    private function notify()\n    {\n        if (true) {\n            return;\n        }\n\n        return '';\n    }\n}\n",[134],{"type":42,"tag":135,"props":136,"children":137},"code",{"__ignoreMap":7},[138,162,171,185,194,219,228,253,262,270,314,322,345,353,361,382,390,421,429,455,463,471,492,500,524,537,546,554,572,580],{"type":42,"tag":139,"props":140,"children":143},"span",{"class":141,"line":142},"line",1,[144,150,156],{"type":42,"tag":139,"props":145,"children":147},{"style":146},"--shiki-default:#C678DD",[148],{"type":53,"value":149},"namespace",{"type":42,"tag":139,"props":151,"children":153},{"style":152},"--shiki-default:#E5C07B",[154],{"type":53,"value":155}," FM",{"type":42,"tag":139,"props":157,"children":159},{"style":158},"--shiki-default:#ABB2BF",[160],{"type":53,"value":161},";\n",{"type":42,"tag":139,"props":163,"children":165},{"class":141,"line":164},2,[166],{"type":42,"tag":139,"props":167,"children":168},{"emptyLinePlaceholder":37},[169],{"type":53,"value":170},"\n",{"type":42,"tag":139,"props":172,"children":174},{"class":141,"line":173},3,[175,180],{"type":42,"tag":139,"props":176,"children":177},{"style":146},[178],{"type":53,"value":179},"class",{"type":42,"tag":139,"props":181,"children":182},{"style":152},[183],{"type":53,"value":184}," Test\n",{"type":42,"tag":139,"props":186,"children":188},{"class":141,"line":187},4,[189],{"type":42,"tag":139,"props":190,"children":191},{"style":158},[192],{"type":53,"value":193},"{\n",{"type":42,"tag":139,"props":195,"children":197},{"class":141,"line":196},5,[198,203,208,214],{"type":42,"tag":139,"props":199,"children":200},{"style":146},[201],{"type":53,"value":202},"    public",{"type":42,"tag":139,"props":204,"children":205},{"style":146},[206],{"type":53,"value":207}," function",{"type":42,"tag":139,"props":209,"children":211},{"style":210},"--shiki-default:#56B6C2",[212],{"type":53,"value":213}," __construct",{"type":42,"tag":139,"props":215,"children":216},{"style":158},[217],{"type":53,"value":218},"()\n",{"type":42,"tag":139,"props":220,"children":222},{"class":141,"line":221},6,[223],{"type":42,"tag":139,"props":224,"children":225},{"style":158},[226],{"type":53,"value":227},"    {\n",{"type":42,"tag":139,"props":229,"children":231},{"class":141,"line":230},7,[232,237,242,248],{"type":42,"tag":139,"props":233,"children":234},{"style":152},[235],{"type":53,"value":236},"        $this",{"type":42,"tag":139,"props":238,"children":239},{"style":158},[240],{"type":53,"value":241},"->",{"type":42,"tag":139,"props":243,"children":245},{"style":244},"--shiki-default:#61AFEF",[246],{"type":53,"value":247},"call",{"type":42,"tag":139,"props":249,"children":250},{"style":158},[251],{"type":53,"value":252},"();\n",{"type":42,"tag":139,"props":254,"children":256},{"class":141,"line":255},8,[257],{"type":42,"tag":139,"props":258,"children":259},{"style":158},[260],{"type":53,"value":261},"    }\n",{"type":42,"tag":139,"props":263,"children":265},{"class":141,"line":264},9,[266],{"type":42,"tag":139,"props":267,"children":268},{"emptyLinePlaceholder":37},[269],{"type":53,"value":170},{"type":42,"tag":139,"props":271,"children":273},{"class":141,"line":272},10,[274,279,283,288,293,298,304,309],{"type":42,"tag":139,"props":275,"children":276},{"style":146},[277],{"type":53,"value":278},"    private",{"type":42,"tag":139,"props":280,"children":281},{"style":146},[282],{"type":53,"value":207},{"type":42,"tag":139,"props":284,"children":285},{"style":244},[286],{"type":53,"value":287}," log",{"type":42,"tag":139,"props":289,"children":290},{"style":158},[291],{"type":53,"value":292},"(",{"type":42,"tag":139,"props":294,"children":295},{"style":152},[296],{"type":53,"value":297},"string",{"type":42,"tag":139,"props":299,"children":301},{"style":300},"--shiki-default:#E06C75",[302],{"type":53,"value":303}," $message",{"type":42,"tag":139,"props":305,"children":306},{"style":158},[307],{"type":53,"value":308},"): ",{"type":42,"tag":139,"props":310,"children":311},{"style":152},[312],{"type":53,"value":313},"void\n",{"type":42,"tag":139,"props":315,"children":317},{"class":141,"line":316},11,[318],{"type":42,"tag":139,"props":319,"children":320},{"style":158},[321],{"type":53,"value":227},{"type":42,"tag":139,"props":323,"children":325},{"class":141,"line":324},12,[326,331,335,340],{"type":42,"tag":139,"props":327,"children":328},{"style":210},[329],{"type":53,"value":330},"        error_log",{"type":42,"tag":139,"props":332,"children":333},{"style":158},[334],{"type":53,"value":292},{"type":42,"tag":139,"props":336,"children":337},{"style":300},[338],{"type":53,"value":339},"$message",{"type":42,"tag":139,"props":341,"children":342},{"style":158},[343],{"type":53,"value":344},");\n",{"type":42,"tag":139,"props":346,"children":348},{"class":141,"line":347},13,[349],{"type":42,"tag":139,"props":350,"children":351},{"style":158},[352],{"type":53,"value":261},{"type":42,"tag":139,"props":354,"children":356},{"class":141,"line":355},14,[357],{"type":42,"tag":139,"props":358,"children":359},{"emptyLinePlaceholder":37},[360],{"type":53,"value":170},{"type":42,"tag":139,"props":362,"children":364},{"class":141,"line":363},15,[365,369,373,378],{"type":42,"tag":139,"props":366,"children":367},{"style":146},[368],{"type":53,"value":278},{"type":42,"tag":139,"props":370,"children":371},{"style":146},[372],{"type":53,"value":207},{"type":42,"tag":139,"props":374,"children":375},{"style":244},[376],{"type":53,"value":377}," call",{"type":42,"tag":139,"props":379,"children":380},{"style":158},[381],{"type":53,"value":218},{"type":42,"tag":139,"props":383,"children":385},{"class":141,"line":384},16,[386],{"type":42,"tag":139,"props":387,"children":388},{"style":158},[389],{"type":53,"value":227},{"type":42,"tag":139,"props":391,"children":393},{"class":141,"line":392},17,[394,398,402,407,411,417],{"type":42,"tag":139,"props":395,"children":396},{"style":152},[397],{"type":53,"value":236},{"type":42,"tag":139,"props":399,"children":400},{"style":158},[401],{"type":53,"value":241},{"type":42,"tag":139,"props":403,"children":404},{"style":244},[405],{"type":53,"value":406},"log",{"type":42,"tag":139,"props":408,"children":409},{"style":158},[410],{"type":53,"value":292},{"type":42,"tag":139,"props":412,"children":414},{"style":413},"--shiki-default:#D19A66",[415],{"type":53,"value":416},"1",{"type":42,"tag":139,"props":418,"children":419},{"style":158},[420],{"type":53,"value":344},{"type":42,"tag":139,"props":422,"children":424},{"class":141,"line":423},18,[425],{"type":42,"tag":139,"props":426,"children":427},{"emptyLinePlaceholder":37},[428],{"type":53,"value":170},{"type":42,"tag":139,"props":430,"children":432},{"class":141,"line":431},19,[433,438,443,447,451],{"type":42,"tag":139,"props":434,"children":435},{"style":146},[436],{"type":53,"value":437},"        return",{"type":42,"tag":139,"props":439,"children":440},{"style":244},[441],{"type":53,"value":442}," get_posts",{"type":42,"tag":139,"props":444,"children":445},{"style":158},[446],{"type":53,"value":292},{"type":42,"tag":139,"props":448,"children":449},{"style":413},[450],{"type":53,"value":416},{"type":42,"tag":139,"props":452,"children":453},{"style":158},[454],{"type":53,"value":344},{"type":42,"tag":139,"props":456,"children":458},{"class":141,"line":457},20,[459],{"type":42,"tag":139,"props":460,"children":461},{"style":158},[462],{"type":53,"value":261},{"type":42,"tag":139,"props":464,"children":466},{"class":141,"line":465},21,[467],{"type":42,"tag":139,"props":468,"children":469},{"emptyLinePlaceholder":37},[470],{"type":53,"value":170},{"type":42,"tag":139,"props":472,"children":474},{"class":141,"line":473},22,[475,479,483,488],{"type":42,"tag":139,"props":476,"children":477},{"style":146},[478],{"type":53,"value":278},{"type":42,"tag":139,"props":480,"children":481},{"style":146},[482],{"type":53,"value":207},{"type":42,"tag":139,"props":484,"children":485},{"style":244},[486],{"type":53,"value":487}," notify",{"type":42,"tag":139,"props":489,"children":490},{"style":158},[491],{"type":53,"value":218},{"type":42,"tag":139,"props":493,"children":495},{"class":141,"line":494},23,[496],{"type":42,"tag":139,"props":497,"children":498},{"style":158},[499],{"type":53,"value":227},{"type":42,"tag":139,"props":501,"children":503},{"class":141,"line":502},24,[504,509,514,519],{"type":42,"tag":139,"props":505,"children":506},{"style":146},[507],{"type":53,"value":508},"        if",{"type":42,"tag":139,"props":510,"children":511},{"style":158},[512],{"type":53,"value":513}," (",{"type":42,"tag":139,"props":515,"children":516},{"style":413},[517],{"type":53,"value":518},"true",{"type":42,"tag":139,"props":520,"children":521},{"style":158},[522],{"type":53,"value":523},") {\n",{"type":42,"tag":139,"props":525,"children":527},{"class":141,"line":526},25,[528,533],{"type":42,"tag":139,"props":529,"children":530},{"style":146},[531],{"type":53,"value":532},"            return",{"type":42,"tag":139,"props":534,"children":535},{"style":158},[536],{"type":53,"value":161},{"type":42,"tag":139,"props":538,"children":540},{"class":141,"line":539},26,[541],{"type":42,"tag":139,"props":542,"children":543},{"style":158},[544],{"type":53,"value":545},"        }\n",{"type":42,"tag":139,"props":547,"children":549},{"class":141,"line":548},27,[550],{"type":42,"tag":139,"props":551,"children":552},{"emptyLinePlaceholder":37},[553],{"type":53,"value":170},{"type":42,"tag":139,"props":555,"children":557},{"class":141,"line":556},28,[558,562,568],{"type":42,"tag":139,"props":559,"children":560},{"style":146},[561],{"type":53,"value":437},{"type":42,"tag":139,"props":563,"children":565},{"style":564},"--shiki-default:#98C379",[566],{"type":53,"value":567}," ''",{"type":42,"tag":139,"props":569,"children":570},{"style":158},[571],{"type":53,"value":161},{"type":42,"tag":139,"props":573,"children":575},{"class":141,"line":574},29,[576],{"type":42,"tag":139,"props":577,"children":578},{"style":158},[579],{"type":53,"value":261},{"type":42,"tag":139,"props":581,"children":583},{"class":141,"line":582},30,[584],{"type":42,"tag":139,"props":585,"children":586},{"style":158},[587],{"type":53,"value":588},"}\n",{"type":42,"tag":49,"props":590,"children":591},{},[592,594,599],{"type":53,"value":593},"There are at least ",{"type":42,"tag":56,"props":595,"children":596},{},[597],{"type":53,"value":598},"four potential issues",{"type":53,"value":600}," to be aware of. Three are non-critical, meaning the application may still work but could produce a warning. There is, however, one critical factor that could affect the business results.",{"type":42,"tag":602,"props":603,"children":604},"table",{},[605,625],{"type":42,"tag":606,"props":607,"children":608},"thead",{},[609],{"type":42,"tag":610,"props":611,"children":612},"tr",{},[613,620],{"type":42,"tag":614,"props":615,"children":617},"th",{"align":616},"center",[618],{"type":53,"value":619},"Line",{"type":42,"tag":614,"props":621,"children":622},{"align":616},[623],{"type":53,"value":624},"Issue",{"type":42,"tag":626,"props":627,"children":628},"tbody",{},[629,664,703,726],{"type":42,"tag":610,"props":630,"children":631},{},[632,643],{"type":42,"tag":633,"props":634,"children":635},"td",{"align":616},[636],{"type":42,"tag":637,"props":638,"children":640},"button",{"type":637,"dataModal":639},"EIwW8aKh",[641],{"type":53,"value":642},"19",{"type":42,"tag":633,"props":644,"children":645},{"align":616},[646,648,654,656,662],{"type":53,"value":647},"Incorrect value passed to ",{"type":42,"tag":135,"props":649,"children":651},{"className":650},[],[652],{"type":53,"value":653},"get_posts",{"type":53,"value":655}," function. WordPress requires an array of ",{"type":42,"tag":135,"props":657,"children":659},{"className":658},[],[660],{"type":53,"value":661},"WP_Query",{"type":53,"value":663}," arguments instead.",{"type":42,"tag":610,"props":665,"children":666},{},[667,676],{"type":42,"tag":633,"props":668,"children":669},{"align":616},[670],{"type":42,"tag":637,"props":671,"children":673},{"type":637,"dataModal":672},"c0iWxoTr",[674],{"type":53,"value":675},"17",{"type":42,"tag":633,"props":677,"children":678},{"align":616},[679,681,686,688,693,695,701],{"type":53,"value":680},"Incorrect value passed to the ",{"type":42,"tag":135,"props":682,"children":684},{"className":683},[],[685],{"type":53,"value":406},{"type":53,"value":687}," function which requires ",{"type":42,"tag":135,"props":689,"children":691},{"className":690},[],[692],{"type":53,"value":297},{"type":53,"value":694},", but ",{"type":42,"tag":135,"props":696,"children":698},{"className":697},[],[699],{"type":53,"value":700},"int",{"type":53,"value":702}," is passed.",{"type":42,"tag":610,"props":704,"children":705},{},[706,715],{"type":42,"tag":633,"props":707,"children":708},{"align":616},[709],{"type":42,"tag":637,"props":710,"children":712},{"type":637,"dataModal":711},"S2ShNeok",[713],{"type":53,"value":714},"28",{"type":42,"tag":633,"props":716,"children":717},{"align":616},[718,720,725],{"type":53,"value":719},"Unreachable code caused by the condition that is always ",{"type":42,"tag":135,"props":721,"children":723},{"className":722},[],[724],{"type":53,"value":518},{"type":53,"value":62},{"type":42,"tag":610,"props":727,"children":728},{},[729,738],{"type":42,"tag":633,"props":730,"children":731},{"align":616},[732],{"type":42,"tag":637,"props":733,"children":735},{"type":637,"dataModal":734},"EKeflIW2",[736],{"type":53,"value":737},"22",{"type":42,"tag":633,"props":739,"children":740},{"align":616},[741,743,749],{"type":53,"value":742},"The ",{"type":42,"tag":135,"props":744,"children":746},{"className":745},[],[747],{"type":53,"value":748},"notify",{"type":53,"value":750}," function is private and never used.",{"type":42,"tag":752,"props":753,"children":754},"prose-modal",{"id":639},[755,762,778],{"type":42,"tag":756,"props":757,"children":759},"h3",{"id":758},"line-19",[760],{"type":53,"value":761},"Line #19",{"type":42,"tag":49,"props":763,"children":764},{},[765,766,771,772,777],{"type":53,"value":647},{"type":42,"tag":135,"props":767,"children":769},{"className":768},[],[770],{"type":53,"value":653},{"type":53,"value":655},{"type":42,"tag":135,"props":773,"children":775},{"className":774},[],[776],{"type":53,"value":661},{"type":53,"value":663},{"type":42,"tag":129,"props":779,"children":781},{"className":131,"code":132,"highlights":780,"language":5,"meta":7,"style":7},[431],[782],{"type":42,"tag":135,"props":783,"children":784},{"__ignoreMap":7},[785,800,807,818,825,844,851,870,877,884,919,926,945,952,959,978,985,1012,1019,1044,1051,1058,1077,1084,1103,1114,1121,1128,1143,1150],{"type":42,"tag":139,"props":786,"children":787},{"class":141,"line":142},[788,792,796],{"type":42,"tag":139,"props":789,"children":790},{"style":146},[791],{"type":53,"value":149},{"type":42,"tag":139,"props":793,"children":794},{"style":152},[795],{"type":53,"value":155},{"type":42,"tag":139,"props":797,"children":798},{"style":158},[799],{"type":53,"value":161},{"type":42,"tag":139,"props":801,"children":802},{"class":141,"line":164},[803],{"type":42,"tag":139,"props":804,"children":805},{"emptyLinePlaceholder":37},[806],{"type":53,"value":170},{"type":42,"tag":139,"props":808,"children":809},{"class":141,"line":173},[810,814],{"type":42,"tag":139,"props":811,"children":812},{"style":146},[813],{"type":53,"value":179},{"type":42,"tag":139,"props":815,"children":816},{"style":152},[817],{"type":53,"value":184},{"type":42,"tag":139,"props":819,"children":820},{"class":141,"line":187},[821],{"type":42,"tag":139,"props":822,"children":823},{"style":158},[824],{"type":53,"value":193},{"type":42,"tag":139,"props":826,"children":827},{"class":141,"line":196},[828,832,836,840],{"type":42,"tag":139,"props":829,"children":830},{"style":146},[831],{"type":53,"value":202},{"type":42,"tag":139,"props":833,"children":834},{"style":146},[835],{"type":53,"value":207},{"type":42,"tag":139,"props":837,"children":838},{"style":210},[839],{"type":53,"value":213},{"type":42,"tag":139,"props":841,"children":842},{"style":158},[843],{"type":53,"value":218},{"type":42,"tag":139,"props":845,"children":846},{"class":141,"line":221},[847],{"type":42,"tag":139,"props":848,"children":849},{"style":158},[850],{"type":53,"value":227},{"type":42,"tag":139,"props":852,"children":853},{"class":141,"line":230},[854,858,862,866],{"type":42,"tag":139,"props":855,"children":856},{"style":152},[857],{"type":53,"value":236},{"type":42,"tag":139,"props":859,"children":860},{"style":158},[861],{"type":53,"value":241},{"type":42,"tag":139,"props":863,"children":864},{"style":244},[865],{"type":53,"value":247},{"type":42,"tag":139,"props":867,"children":868},{"style":158},[869],{"type":53,"value":252},{"type":42,"tag":139,"props":871,"children":872},{"class":141,"line":255},[873],{"type":42,"tag":139,"props":874,"children":875},{"style":158},[876],{"type":53,"value":261},{"type":42,"tag":139,"props":878,"children":879},{"class":141,"line":264},[880],{"type":42,"tag":139,"props":881,"children":882},{"emptyLinePlaceholder":37},[883],{"type":53,"value":170},{"type":42,"tag":139,"props":885,"children":886},{"class":141,"line":272},[887,891,895,899,903,907,911,915],{"type":42,"tag":139,"props":888,"children":889},{"style":146},[890],{"type":53,"value":278},{"type":42,"tag":139,"props":892,"children":893},{"style":146},[894],{"type":53,"value":207},{"type":42,"tag":139,"props":896,"children":897},{"style":244},[898],{"type":53,"value":287},{"type":42,"tag":139,"props":900,"children":901},{"style":158},[902],{"type":53,"value":292},{"type":42,"tag":139,"props":904,"children":905},{"style":152},[906],{"type":53,"value":297},{"type":42,"tag":139,"props":908,"children":909},{"style":300},[910],{"type":53,"value":303},{"type":42,"tag":139,"props":912,"children":913},{"style":158},[914],{"type":53,"value":308},{"type":42,"tag":139,"props":916,"children":917},{"style":152},[918],{"type":53,"value":313},{"type":42,"tag":139,"props":920,"children":921},{"class":141,"line":316},[922],{"type":42,"tag":139,"props":923,"children":924},{"style":158},[925],{"type":53,"value":227},{"type":42,"tag":139,"props":927,"children":928},{"class":141,"line":324},[929,933,937,941],{"type":42,"tag":139,"props":930,"children":931},{"style":210},[932],{"type":53,"value":330},{"type":42,"tag":139,"props":934,"children":935},{"style":158},[936],{"type":53,"value":292},{"type":42,"tag":139,"props":938,"children":939},{"style":300},[940],{"type":53,"value":339},{"type":42,"tag":139,"props":942,"children":943},{"style":158},[944],{"type":53,"value":344},{"type":42,"tag":139,"props":946,"children":947},{"class":141,"line":347},[948],{"type":42,"tag":139,"props":949,"children":950},{"style":158},[951],{"type":53,"value":261},{"type":42,"tag":139,"props":953,"children":954},{"class":141,"line":355},[955],{"type":42,"tag":139,"props":956,"children":957},{"emptyLinePlaceholder":37},[958],{"type":53,"value":170},{"type":42,"tag":139,"props":960,"children":961},{"class":141,"line":363},[962,966,970,974],{"type":42,"tag":139,"props":963,"children":964},{"style":146},[965],{"type":53,"value":278},{"type":42,"tag":139,"props":967,"children":968},{"style":146},[969],{"type":53,"value":207},{"type":42,"tag":139,"props":971,"children":972},{"style":244},[973],{"type":53,"value":377},{"type":42,"tag":139,"props":975,"children":976},{"style":158},[977],{"type":53,"value":218},{"type":42,"tag":139,"props":979,"children":980},{"class":141,"line":384},[981],{"type":42,"tag":139,"props":982,"children":983},{"style":158},[984],{"type":53,"value":227},{"type":42,"tag":139,"props":986,"children":987},{"class":141,"line":392},[988,992,996,1000,1004,1008],{"type":42,"tag":139,"props":989,"children":990},{"style":152},[991],{"type":53,"value":236},{"type":42,"tag":139,"props":993,"children":994},{"style":158},[995],{"type":53,"value":241},{"type":42,"tag":139,"props":997,"children":998},{"style":244},[999],{"type":53,"value":406},{"type":42,"tag":139,"props":1001,"children":1002},{"style":158},[1003],{"type":53,"value":292},{"type":42,"tag":139,"props":1005,"children":1006},{"style":413},[1007],{"type":53,"value":416},{"type":42,"tag":139,"props":1009,"children":1010},{"style":158},[1011],{"type":53,"value":344},{"type":42,"tag":139,"props":1013,"children":1014},{"class":141,"line":423},[1015],{"type":42,"tag":139,"props":1016,"children":1017},{"emptyLinePlaceholder":37},[1018],{"type":53,"value":170},{"type":42,"tag":139,"props":1020,"children":1023},{"class":1021,"line":431},[141,1022],"highlight",[1024,1028,1032,1036,1040],{"type":42,"tag":139,"props":1025,"children":1026},{"style":146},[1027],{"type":53,"value":437},{"type":42,"tag":139,"props":1029,"children":1030},{"style":244},[1031],{"type":53,"value":442},{"type":42,"tag":139,"props":1033,"children":1034},{"style":158},[1035],{"type":53,"value":292},{"type":42,"tag":139,"props":1037,"children":1038},{"style":413},[1039],{"type":53,"value":416},{"type":42,"tag":139,"props":1041,"children":1042},{"style":158},[1043],{"type":53,"value":344},{"type":42,"tag":139,"props":1045,"children":1046},{"class":141,"line":457},[1047],{"type":42,"tag":139,"props":1048,"children":1049},{"style":158},[1050],{"type":53,"value":261},{"type":42,"tag":139,"props":1052,"children":1053},{"class":141,"line":465},[1054],{"type":42,"tag":139,"props":1055,"children":1056},{"emptyLinePlaceholder":37},[1057],{"type":53,"value":170},{"type":42,"tag":139,"props":1059,"children":1060},{"class":141,"line":473},[1061,1065,1069,1073],{"type":42,"tag":139,"props":1062,"children":1063},{"style":146},[1064],{"type":53,"value":278},{"type":42,"tag":139,"props":1066,"children":1067},{"style":146},[1068],{"type":53,"value":207},{"type":42,"tag":139,"props":1070,"children":1071},{"style":244},[1072],{"type":53,"value":487},{"type":42,"tag":139,"props":1074,"children":1075},{"style":158},[1076],{"type":53,"value":218},{"type":42,"tag":139,"props":1078,"children":1079},{"class":141,"line":494},[1080],{"type":42,"tag":139,"props":1081,"children":1082},{"style":158},[1083],{"type":53,"value":227},{"type":42,"tag":139,"props":1085,"children":1086},{"class":141,"line":502},[1087,1091,1095,1099],{"type":42,"tag":139,"props":1088,"children":1089},{"style":146},[1090],{"type":53,"value":508},{"type":42,"tag":139,"props":1092,"children":1093},{"style":158},[1094],{"type":53,"value":513},{"type":42,"tag":139,"props":1096,"children":1097},{"style":413},[1098],{"type":53,"value":518},{"type":42,"tag":139,"props":1100,"children":1101},{"style":158},[1102],{"type":53,"value":523},{"type":42,"tag":139,"props":1104,"children":1105},{"class":141,"line":526},[1106,1110],{"type":42,"tag":139,"props":1107,"children":1108},{"style":146},[1109],{"type":53,"value":532},{"type":42,"tag":139,"props":1111,"children":1112},{"style":158},[1113],{"type":53,"value":161},{"type":42,"tag":139,"props":1115,"children":1116},{"class":141,"line":539},[1117],{"type":42,"tag":139,"props":1118,"children":1119},{"style":158},[1120],{"type":53,"value":545},{"type":42,"tag":139,"props":1122,"children":1123},{"class":141,"line":548},[1124],{"type":42,"tag":139,"props":1125,"children":1126},{"emptyLinePlaceholder":37},[1127],{"type":53,"value":170},{"type":42,"tag":139,"props":1129,"children":1130},{"class":141,"line":556},[1131,1135,1139],{"type":42,"tag":139,"props":1132,"children":1133},{"style":146},[1134],{"type":53,"value":437},{"type":42,"tag":139,"props":1136,"children":1137},{"style":564},[1138],{"type":53,"value":567},{"type":42,"tag":139,"props":1140,"children":1141},{"style":158},[1142],{"type":53,"value":161},{"type":42,"tag":139,"props":1144,"children":1145},{"class":141,"line":574},[1146],{"type":42,"tag":139,"props":1147,"children":1148},{"style":158},[1149],{"type":53,"value":261},{"type":42,"tag":139,"props":1151,"children":1152},{"class":141,"line":582},[1153],{"type":42,"tag":139,"props":1154,"children":1155},{"style":158},[1156],{"type":53,"value":588},{"type":42,"tag":752,"props":1158,"children":1159},{"id":672},[1160,1166,1188],{"type":42,"tag":756,"props":1161,"children":1163},{"id":1162},"line-17",[1164],{"type":53,"value":1165},"Line #17",{"type":42,"tag":49,"props":1167,"children":1168},{},[1169,1170,1175,1176,1181,1182,1187],{"type":53,"value":680},{"type":42,"tag":135,"props":1171,"children":1173},{"className":1172},[],[1174],{"type":53,"value":406},{"type":53,"value":687},{"type":42,"tag":135,"props":1177,"children":1179},{"className":1178},[],[1180],{"type":53,"value":297},{"type":53,"value":694},{"type":42,"tag":135,"props":1183,"children":1185},{"className":1184},[],[1186],{"type":53,"value":700},{"type":53,"value":702},{"type":42,"tag":129,"props":1189,"children":1191},{"className":131,"code":132,"highlights":1190,"language":5,"meta":7,"style":7},[272,316,324,347,392],[1192],{"type":42,"tag":135,"props":1193,"children":1194},{"__ignoreMap":7},[1195,1210,1217,1228,1235,1254,1261,1280,1287,1294,1330,1338,1358,1366,1373,1392,1399,1427,1434,1457,1464,1471,1490,1497,1516,1527,1534,1541,1556,1563],{"type":42,"tag":139,"props":1196,"children":1197},{"class":141,"line":142},[1198,1202,1206],{"type":42,"tag":139,"props":1199,"children":1200},{"style":146},[1201],{"type":53,"value":149},{"type":42,"tag":139,"props":1203,"children":1204},{"style":152},[1205],{"type":53,"value":155},{"type":42,"tag":139,"props":1207,"children":1208},{"style":158},[1209],{"type":53,"value":161},{"type":42,"tag":139,"props":1211,"children":1212},{"class":141,"line":164},[1213],{"type":42,"tag":139,"props":1214,"children":1215},{"emptyLinePlaceholder":37},[1216],{"type":53,"value":170},{"type":42,"tag":139,"props":1218,"children":1219},{"class":141,"line":173},[1220,1224],{"type":42,"tag":139,"props":1221,"children":1222},{"style":146},[1223],{"type":53,"value":179},{"type":42,"tag":139,"props":1225,"children":1226},{"style":152},[1227],{"type":53,"value":184},{"type":42,"tag":139,"props":1229,"children":1230},{"class":141,"line":187},[1231],{"type":42,"tag":139,"props":1232,"children":1233},{"style":158},[1234],{"type":53,"value":193},{"type":42,"tag":139,"props":1236,"children":1237},{"class":141,"line":196},[1238,1242,1246,1250],{"type":42,"tag":139,"props":1239,"children":1240},{"style":146},[1241],{"type":53,"value":202},{"type":42,"tag":139,"props":1243,"children":1244},{"style":146},[1245],{"type":53,"value":207},{"type":42,"tag":139,"props":1247,"children":1248},{"style":210},[1249],{"type":53,"value":213},{"type":42,"tag":139,"props":1251,"children":1252},{"style":158},[1253],{"type":53,"value":218},{"type":42,"tag":139,"props":1255,"children":1256},{"class":141,"line":221},[1257],{"type":42,"tag":139,"props":1258,"children":1259},{"style":158},[1260],{"type":53,"value":227},{"type":42,"tag":139,"props":1262,"children":1263},{"class":141,"line":230},[1264,1268,1272,1276],{"type":42,"tag":139,"props":1265,"children":1266},{"style":152},[1267],{"type":53,"value":236},{"type":42,"tag":139,"props":1269,"children":1270},{"style":158},[1271],{"type":53,"value":241},{"type":42,"tag":139,"props":1273,"children":1274},{"style":244},[1275],{"type":53,"value":247},{"type":42,"tag":139,"props":1277,"children":1278},{"style":158},[1279],{"type":53,"value":252},{"type":42,"tag":139,"props":1281,"children":1282},{"class":141,"line":255},[1283],{"type":42,"tag":139,"props":1284,"children":1285},{"style":158},[1286],{"type":53,"value":261},{"type":42,"tag":139,"props":1288,"children":1289},{"class":141,"line":264},[1290],{"type":42,"tag":139,"props":1291,"children":1292},{"emptyLinePlaceholder":37},[1293],{"type":53,"value":170},{"type":42,"tag":139,"props":1295,"children":1297},{"class":1296,"line":272},[141,1022],[1298,1302,1306,1310,1314,1318,1322,1326],{"type":42,"tag":139,"props":1299,"children":1300},{"style":146},[1301],{"type":53,"value":278},{"type":42,"tag":139,"props":1303,"children":1304},{"style":146},[1305],{"type":53,"value":207},{"type":42,"tag":139,"props":1307,"children":1308},{"style":244},[1309],{"type":53,"value":287},{"type":42,"tag":139,"props":1311,"children":1312},{"style":158},[1313],{"type":53,"value":292},{"type":42,"tag":139,"props":1315,"children":1316},{"style":152},[1317],{"type":53,"value":297},{"type":42,"tag":139,"props":1319,"children":1320},{"style":300},[1321],{"type":53,"value":303},{"type":42,"tag":139,"props":1323,"children":1324},{"style":158},[1325],{"type":53,"value":308},{"type":42,"tag":139,"props":1327,"children":1328},{"style":152},[1329],{"type":53,"value":313},{"type":42,"tag":139,"props":1331,"children":1333},{"class":1332,"line":316},[141,1022],[1334],{"type":42,"tag":139,"props":1335,"children":1336},{"style":158},[1337],{"type":53,"value":227},{"type":42,"tag":139,"props":1339,"children":1341},{"class":1340,"line":324},[141,1022],[1342,1346,1350,1354],{"type":42,"tag":139,"props":1343,"children":1344},{"style":210},[1345],{"type":53,"value":330},{"type":42,"tag":139,"props":1347,"children":1348},{"style":158},[1349],{"type":53,"value":292},{"type":42,"tag":139,"props":1351,"children":1352},{"style":300},[1353],{"type":53,"value":339},{"type":42,"tag":139,"props":1355,"children":1356},{"style":158},[1357],{"type":53,"value":344},{"type":42,"tag":139,"props":1359,"children":1361},{"class":1360,"line":347},[141,1022],[1362],{"type":42,"tag":139,"props":1363,"children":1364},{"style":158},[1365],{"type":53,"value":261},{"type":42,"tag":139,"props":1367,"children":1368},{"class":141,"line":355},[1369],{"type":42,"tag":139,"props":1370,"children":1371},{"emptyLinePlaceholder":37},[1372],{"type":53,"value":170},{"type":42,"tag":139,"props":1374,"children":1375},{"class":141,"line":363},[1376,1380,1384,1388],{"type":42,"tag":139,"props":1377,"children":1378},{"style":146},[1379],{"type":53,"value":278},{"type":42,"tag":139,"props":1381,"children":1382},{"style":146},[1383],{"type":53,"value":207},{"type":42,"tag":139,"props":1385,"children":1386},{"style":244},[1387],{"type":53,"value":377},{"type":42,"tag":139,"props":1389,"children":1390},{"style":158},[1391],{"type":53,"value":218},{"type":42,"tag":139,"props":1393,"children":1394},{"class":141,"line":384},[1395],{"type":42,"tag":139,"props":1396,"children":1397},{"style":158},[1398],{"type":53,"value":227},{"type":42,"tag":139,"props":1400,"children":1402},{"class":1401,"line":392},[141,1022],[1403,1407,1411,1415,1419,1423],{"type":42,"tag":139,"props":1404,"children":1405},{"style":152},[1406],{"type":53,"value":236},{"type":42,"tag":139,"props":1408,"children":1409},{"style":158},[1410],{"type":53,"value":241},{"type":42,"tag":139,"props":1412,"children":1413},{"style":244},[1414],{"type":53,"value":406},{"type":42,"tag":139,"props":1416,"children":1417},{"style":158},[1418],{"type":53,"value":292},{"type":42,"tag":139,"props":1420,"children":1421},{"style":413},[1422],{"type":53,"value":416},{"type":42,"tag":139,"props":1424,"children":1425},{"style":158},[1426],{"type":53,"value":344},{"type":42,"tag":139,"props":1428,"children":1429},{"class":141,"line":423},[1430],{"type":42,"tag":139,"props":1431,"children":1432},{"emptyLinePlaceholder":37},[1433],{"type":53,"value":170},{"type":42,"tag":139,"props":1435,"children":1436},{"class":141,"line":431},[1437,1441,1445,1449,1453],{"type":42,"tag":139,"props":1438,"children":1439},{"style":146},[1440],{"type":53,"value":437},{"type":42,"tag":139,"props":1442,"children":1443},{"style":244},[1444],{"type":53,"value":442},{"type":42,"tag":139,"props":1446,"children":1447},{"style":158},[1448],{"type":53,"value":292},{"type":42,"tag":139,"props":1450,"children":1451},{"style":413},[1452],{"type":53,"value":416},{"type":42,"tag":139,"props":1454,"children":1455},{"style":158},[1456],{"type":53,"value":344},{"type":42,"tag":139,"props":1458,"children":1459},{"class":141,"line":457},[1460],{"type":42,"tag":139,"props":1461,"children":1462},{"style":158},[1463],{"type":53,"value":261},{"type":42,"tag":139,"props":1465,"children":1466},{"class":141,"line":465},[1467],{"type":42,"tag":139,"props":1468,"children":1469},{"emptyLinePlaceholder":37},[1470],{"type":53,"value":170},{"type":42,"tag":139,"props":1472,"children":1473},{"class":141,"line":473},[1474,1478,1482,1486],{"type":42,"tag":139,"props":1475,"children":1476},{"style":146},[1477],{"type":53,"value":278},{"type":42,"tag":139,"props":1479,"children":1480},{"style":146},[1481],{"type":53,"value":207},{"type":42,"tag":139,"props":1483,"children":1484},{"style":244},[1485],{"type":53,"value":487},{"type":42,"tag":139,"props":1487,"children":1488},{"style":158},[1489],{"type":53,"value":218},{"type":42,"tag":139,"props":1491,"children":1492},{"class":141,"line":494},[1493],{"type":42,"tag":139,"props":1494,"children":1495},{"style":158},[1496],{"type":53,"value":227},{"type":42,"tag":139,"props":1498,"children":1499},{"class":141,"line":502},[1500,1504,1508,1512],{"type":42,"tag":139,"props":1501,"children":1502},{"style":146},[1503],{"type":53,"value":508},{"type":42,"tag":139,"props":1505,"children":1506},{"style":158},[1507],{"type":53,"value":513},{"type":42,"tag":139,"props":1509,"children":1510},{"style":413},[1511],{"type":53,"value":518},{"type":42,"tag":139,"props":1513,"children":1514},{"style":158},[1515],{"type":53,"value":523},{"type":42,"tag":139,"props":1517,"children":1518},{"class":141,"line":526},[1519,1523],{"type":42,"tag":139,"props":1520,"children":1521},{"style":146},[1522],{"type":53,"value":532},{"type":42,"tag":139,"props":1524,"children":1525},{"style":158},[1526],{"type":53,"value":161},{"type":42,"tag":139,"props":1528,"children":1529},{"class":141,"line":539},[1530],{"type":42,"tag":139,"props":1531,"children":1532},{"style":158},[1533],{"type":53,"value":545},{"type":42,"tag":139,"props":1535,"children":1536},{"class":141,"line":548},[1537],{"type":42,"tag":139,"props":1538,"children":1539},{"emptyLinePlaceholder":37},[1540],{"type":53,"value":170},{"type":42,"tag":139,"props":1542,"children":1543},{"class":141,"line":556},[1544,1548,1552],{"type":42,"tag":139,"props":1545,"children":1546},{"style":146},[1547],{"type":53,"value":437},{"type":42,"tag":139,"props":1549,"children":1550},{"style":564},[1551],{"type":53,"value":567},{"type":42,"tag":139,"props":1553,"children":1554},{"style":158},[1555],{"type":53,"value":161},{"type":42,"tag":139,"props":1557,"children":1558},{"class":141,"line":574},[1559],{"type":42,"tag":139,"props":1560,"children":1561},{"style":158},[1562],{"type":53,"value":261},{"type":42,"tag":139,"props":1564,"children":1565},{"class":141,"line":582},[1566],{"type":42,"tag":139,"props":1567,"children":1568},{"style":158},[1569],{"type":53,"value":588},{"type":42,"tag":752,"props":1571,"children":1572},{"id":711},[1573,1579,1589],{"type":42,"tag":756,"props":1574,"children":1576},{"id":1575},"line-28",[1577],{"type":53,"value":1578},"Line #28",{"type":42,"tag":49,"props":1580,"children":1581},{},[1582,1583,1588],{"type":53,"value":719},{"type":42,"tag":135,"props":1584,"children":1586},{"className":1585},[],[1587],{"type":53,"value":518},{"type":53,"value":62},{"type":42,"tag":129,"props":1590,"children":1592},{"className":131,"code":132,"highlights":1591,"language":5,"meta":7,"style":7},[556],[1593],{"type":42,"tag":135,"props":1594,"children":1595},{"__ignoreMap":7},[1596,1611,1618,1629,1636,1655,1662,1681,1688,1695,1730,1737,1756,1763,1770,1789,1796,1823,1830,1853,1860,1867,1886,1893,1912,1923,1930,1937,1953,1960],{"type":42,"tag":139,"props":1597,"children":1598},{"class":141,"line":142},[1599,1603,1607],{"type":42,"tag":139,"props":1600,"children":1601},{"style":146},[1602],{"type":53,"value":149},{"type":42,"tag":139,"props":1604,"children":1605},{"style":152},[1606],{"type":53,"value":155},{"type":42,"tag":139,"props":1608,"children":1609},{"style":158},[1610],{"type":53,"value":161},{"type":42,"tag":139,"props":1612,"children":1613},{"class":141,"line":164},[1614],{"type":42,"tag":139,"props":1615,"children":1616},{"emptyLinePlaceholder":37},[1617],{"type":53,"value":170},{"type":42,"tag":139,"props":1619,"children":1620},{"class":141,"line":173},[1621,1625],{"type":42,"tag":139,"props":1622,"children":1623},{"style":146},[1624],{"type":53,"value":179},{"type":42,"tag":139,"props":1626,"children":1627},{"style":152},[1628],{"type":53,"value":184},{"type":42,"tag":139,"props":1630,"children":1631},{"class":141,"line":187},[1632],{"type":42,"tag":139,"props":1633,"children":1634},{"style":158},[1635],{"type":53,"value":193},{"type":42,"tag":139,"props":1637,"children":1638},{"class":141,"line":196},[1639,1643,1647,1651],{"type":42,"tag":139,"props":1640,"children":1641},{"style":146},[1642],{"type":53,"value":202},{"type":42,"tag":139,"props":1644,"children":1645},{"style":146},[1646],{"type":53,"value":207},{"type":42,"tag":139,"props":1648,"children":1649},{"style":210},[1650],{"type":53,"value":213},{"type":42,"tag":139,"props":1652,"children":1653},{"style":158},[1654],{"type":53,"value":218},{"type":42,"tag":139,"props":1656,"children":1657},{"class":141,"line":221},[1658],{"type":42,"tag":139,"props":1659,"children":1660},{"style":158},[1661],{"type":53,"value":227},{"type":42,"tag":139,"props":1663,"children":1664},{"class":141,"line":230},[1665,1669,1673,1677],{"type":42,"tag":139,"props":1666,"children":1667},{"style":152},[1668],{"type":53,"value":236},{"type":42,"tag":139,"props":1670,"children":1671},{"style":158},[1672],{"type":53,"value":241},{"type":42,"tag":139,"props":1674,"children":1675},{"style":244},[1676],{"type":53,"value":247},{"type":42,"tag":139,"props":1678,"children":1679},{"style":158},[1680],{"type":53,"value":252},{"type":42,"tag":139,"props":1682,"children":1683},{"class":141,"line":255},[1684],{"type":42,"tag":139,"props":1685,"children":1686},{"style":158},[1687],{"type":53,"value":261},{"type":42,"tag":139,"props":1689,"children":1690},{"class":141,"line":264},[1691],{"type":42,"tag":139,"props":1692,"children":1693},{"emptyLinePlaceholder":37},[1694],{"type":53,"value":170},{"type":42,"tag":139,"props":1696,"children":1697},{"class":141,"line":272},[1698,1702,1706,1710,1714,1718,1722,1726],{"type":42,"tag":139,"props":1699,"children":1700},{"style":146},[1701],{"type":53,"value":278},{"type":42,"tag":139,"props":1703,"children":1704},{"style":146},[1705],{"type":53,"value":207},{"type":42,"tag":139,"props":1707,"children":1708},{"style":244},[1709],{"type":53,"value":287},{"type":42,"tag":139,"props":1711,"children":1712},{"style":158},[1713],{"type":53,"value":292},{"type":42,"tag":139,"props":1715,"children":1716},{"style":152},[1717],{"type":53,"value":297},{"type":42,"tag":139,"props":1719,"children":1720},{"style":300},[1721],{"type":53,"value":303},{"type":42,"tag":139,"props":1723,"children":1724},{"style":158},[1725],{"type":53,"value":308},{"type":42,"tag":139,"props":1727,"children":1728},{"style":152},[1729],{"type":53,"value":313},{"type":42,"tag":139,"props":1731,"children":1732},{"class":141,"line":316},[1733],{"type":42,"tag":139,"props":1734,"children":1735},{"style":158},[1736],{"type":53,"value":227},{"type":42,"tag":139,"props":1738,"children":1739},{"class":141,"line":324},[1740,1744,1748,1752],{"type":42,"tag":139,"props":1741,"children":1742},{"style":210},[1743],{"type":53,"value":330},{"type":42,"tag":139,"props":1745,"children":1746},{"style":158},[1747],{"type":53,"value":292},{"type":42,"tag":139,"props":1749,"children":1750},{"style":300},[1751],{"type":53,"value":339},{"type":42,"tag":139,"props":1753,"children":1754},{"style":158},[1755],{"type":53,"value":344},{"type":42,"tag":139,"props":1757,"children":1758},{"class":141,"line":347},[1759],{"type":42,"tag":139,"props":1760,"children":1761},{"style":158},[1762],{"type":53,"value":261},{"type":42,"tag":139,"props":1764,"children":1765},{"class":141,"line":355},[1766],{"type":42,"tag":139,"props":1767,"children":1768},{"emptyLinePlaceholder":37},[1769],{"type":53,"value":170},{"type":42,"tag":139,"props":1771,"children":1772},{"class":141,"line":363},[1773,1777,1781,1785],{"type":42,"tag":139,"props":1774,"children":1775},{"style":146},[1776],{"type":53,"value":278},{"type":42,"tag":139,"props":1778,"children":1779},{"style":146},[1780],{"type":53,"value":207},{"type":42,"tag":139,"props":1782,"children":1783},{"style":244},[1784],{"type":53,"value":377},{"type":42,"tag":139,"props":1786,"children":1787},{"style":158},[1788],{"type":53,"value":218},{"type":42,"tag":139,"props":1790,"children":1791},{"class":141,"line":384},[1792],{"type":42,"tag":139,"props":1793,"children":1794},{"style":158},[1795],{"type":53,"value":227},{"type":42,"tag":139,"props":1797,"children":1798},{"class":141,"line":392},[1799,1803,1807,1811,1815,1819],{"type":42,"tag":139,"props":1800,"children":1801},{"style":152},[1802],{"type":53,"value":236},{"type":42,"tag":139,"props":1804,"children":1805},{"style":158},[1806],{"type":53,"value":241},{"type":42,"tag":139,"props":1808,"children":1809},{"style":244},[1810],{"type":53,"value":406},{"type":42,"tag":139,"props":1812,"children":1813},{"style":158},[1814],{"type":53,"value":292},{"type":42,"tag":139,"props":1816,"children":1817},{"style":413},[1818],{"type":53,"value":416},{"type":42,"tag":139,"props":1820,"children":1821},{"style":158},[1822],{"type":53,"value":344},{"type":42,"tag":139,"props":1824,"children":1825},{"class":141,"line":423},[1826],{"type":42,"tag":139,"props":1827,"children":1828},{"emptyLinePlaceholder":37},[1829],{"type":53,"value":170},{"type":42,"tag":139,"props":1831,"children":1832},{"class":141,"line":431},[1833,1837,1841,1845,1849],{"type":42,"tag":139,"props":1834,"children":1835},{"style":146},[1836],{"type":53,"value":437},{"type":42,"tag":139,"props":1838,"children":1839},{"style":244},[1840],{"type":53,"value":442},{"type":42,"tag":139,"props":1842,"children":1843},{"style":158},[1844],{"type":53,"value":292},{"type":42,"tag":139,"props":1846,"children":1847},{"style":413},[1848],{"type":53,"value":416},{"type":42,"tag":139,"props":1850,"children":1851},{"style":158},[1852],{"type":53,"value":344},{"type":42,"tag":139,"props":1854,"children":1855},{"class":141,"line":457},[1856],{"type":42,"tag":139,"props":1857,"children":1858},{"style":158},[1859],{"type":53,"value":261},{"type":42,"tag":139,"props":1861,"children":1862},{"class":141,"line":465},[1863],{"type":42,"tag":139,"props":1864,"children":1865},{"emptyLinePlaceholder":37},[1866],{"type":53,"value":170},{"type":42,"tag":139,"props":1868,"children":1869},{"class":141,"line":473},[1870,1874,1878,1882],{"type":42,"tag":139,"props":1871,"children":1872},{"style":146},[1873],{"type":53,"value":278},{"type":42,"tag":139,"props":1875,"children":1876},{"style":146},[1877],{"type":53,"value":207},{"type":42,"tag":139,"props":1879,"children":1880},{"style":244},[1881],{"type":53,"value":487},{"type":42,"tag":139,"props":1883,"children":1884},{"style":158},[1885],{"type":53,"value":218},{"type":42,"tag":139,"props":1887,"children":1888},{"class":141,"line":494},[1889],{"type":42,"tag":139,"props":1890,"children":1891},{"style":158},[1892],{"type":53,"value":227},{"type":42,"tag":139,"props":1894,"children":1895},{"class":141,"line":502},[1896,1900,1904,1908],{"type":42,"tag":139,"props":1897,"children":1898},{"style":146},[1899],{"type":53,"value":508},{"type":42,"tag":139,"props":1901,"children":1902},{"style":158},[1903],{"type":53,"value":513},{"type":42,"tag":139,"props":1905,"children":1906},{"style":413},[1907],{"type":53,"value":518},{"type":42,"tag":139,"props":1909,"children":1910},{"style":158},[1911],{"type":53,"value":523},{"type":42,"tag":139,"props":1913,"children":1914},{"class":141,"line":526},[1915,1919],{"type":42,"tag":139,"props":1916,"children":1917},{"style":146},[1918],{"type":53,"value":532},{"type":42,"tag":139,"props":1920,"children":1921},{"style":158},[1922],{"type":53,"value":161},{"type":42,"tag":139,"props":1924,"children":1925},{"class":141,"line":539},[1926],{"type":42,"tag":139,"props":1927,"children":1928},{"style":158},[1929],{"type":53,"value":545},{"type":42,"tag":139,"props":1931,"children":1932},{"class":141,"line":548},[1933],{"type":42,"tag":139,"props":1934,"children":1935},{"emptyLinePlaceholder":37},[1936],{"type":53,"value":170},{"type":42,"tag":139,"props":1938,"children":1940},{"class":1939,"line":556},[141,1022],[1941,1945,1949],{"type":42,"tag":139,"props":1942,"children":1943},{"style":146},[1944],{"type":53,"value":437},{"type":42,"tag":139,"props":1946,"children":1947},{"style":564},[1948],{"type":53,"value":567},{"type":42,"tag":139,"props":1950,"children":1951},{"style":158},[1952],{"type":53,"value":161},{"type":42,"tag":139,"props":1954,"children":1955},{"class":141,"line":574},[1956],{"type":42,"tag":139,"props":1957,"children":1958},{"style":158},[1959],{"type":53,"value":261},{"type":42,"tag":139,"props":1961,"children":1962},{"class":141,"line":582},[1963],{"type":42,"tag":139,"props":1964,"children":1965},{"style":158},[1966],{"type":53,"value":588},{"type":42,"tag":752,"props":1968,"children":1969},{"id":734},[1970,1976,1986],{"type":42,"tag":756,"props":1971,"children":1973},{"id":1972},"line-22",[1974],{"type":53,"value":1975},"Line #22",{"type":42,"tag":49,"props":1977,"children":1978},{},[1979,1980,1985],{"type":53,"value":742},{"type":42,"tag":135,"props":1981,"children":1983},{"className":1982},[],[1984],{"type":53,"value":748},{"type":53,"value":750},{"type":42,"tag":129,"props":1987,"children":1989},{"className":131,"code":132,"highlights":1988,"language":5,"meta":7,"style":7},[473,494,502,526,539,548,556,574],[1990],{"type":42,"tag":135,"props":1991,"children":1992},{"__ignoreMap":7},[1993,2008,2015,2026,2033,2052,2059,2078,2085,2092,2127,2134,2153,2160,2167,2186,2193,2220,2227,2250,2257,2264,2284,2292,2312,2324,2332,2340,2356,2364],{"type":42,"tag":139,"props":1994,"children":1995},{"class":141,"line":142},[1996,2000,2004],{"type":42,"tag":139,"props":1997,"children":1998},{"style":146},[1999],{"type":53,"value":149},{"type":42,"tag":139,"props":2001,"children":2002},{"style":152},[2003],{"type":53,"value":155},{"type":42,"tag":139,"props":2005,"children":2006},{"style":158},[2007],{"type":53,"value":161},{"type":42,"tag":139,"props":2009,"children":2010},{"class":141,"line":164},[2011],{"type":42,"tag":139,"props":2012,"children":2013},{"emptyLinePlaceholder":37},[2014],{"type":53,"value":170},{"type":42,"tag":139,"props":2016,"children":2017},{"class":141,"line":173},[2018,2022],{"type":42,"tag":139,"props":2019,"children":2020},{"style":146},[2021],{"type":53,"value":179},{"type":42,"tag":139,"props":2023,"children":2024},{"style":152},[2025],{"type":53,"value":184},{"type":42,"tag":139,"props":2027,"children":2028},{"class":141,"line":187},[2029],{"type":42,"tag":139,"props":2030,"children":2031},{"style":158},[2032],{"type":53,"value":193},{"type":42,"tag":139,"props":2034,"children":2035},{"class":141,"line":196},[2036,2040,2044,2048],{"type":42,"tag":139,"props":2037,"children":2038},{"style":146},[2039],{"type":53,"value":202},{"type":42,"tag":139,"props":2041,"children":2042},{"style":146},[2043],{"type":53,"value":207},{"type":42,"tag":139,"props":2045,"children":2046},{"style":210},[2047],{"type":53,"value":213},{"type":42,"tag":139,"props":2049,"children":2050},{"style":158},[2051],{"type":53,"value":218},{"type":42,"tag":139,"props":2053,"children":2054},{"class":141,"line":221},[2055],{"type":42,"tag":139,"props":2056,"children":2057},{"style":158},[2058],{"type":53,"value":227},{"type":42,"tag":139,"props":2060,"children":2061},{"class":141,"line":230},[2062,2066,2070,2074],{"type":42,"tag":139,"props":2063,"children":2064},{"style":152},[2065],{"type":53,"value":236},{"type":42,"tag":139,"props":2067,"children":2068},{"style":158},[2069],{"type":53,"value":241},{"type":42,"tag":139,"props":2071,"children":2072},{"style":244},[2073],{"type":53,"value":247},{"type":42,"tag":139,"props":2075,"children":2076},{"style":158},[2077],{"type":53,"value":252},{"type":42,"tag":139,"props":2079,"children":2080},{"class":141,"line":255},[2081],{"type":42,"tag":139,"props":2082,"children":2083},{"style":158},[2084],{"type":53,"value":261},{"type":42,"tag":139,"props":2086,"children":2087},{"class":141,"line":264},[2088],{"type":42,"tag":139,"props":2089,"children":2090},{"emptyLinePlaceholder":37},[2091],{"type":53,"value":170},{"type":42,"tag":139,"props":2093,"children":2094},{"class":141,"line":272},[2095,2099,2103,2107,2111,2115,2119,2123],{"type":42,"tag":139,"props":2096,"children":2097},{"style":146},[2098],{"type":53,"value":278},{"type":42,"tag":139,"props":2100,"children":2101},{"style":146},[2102],{"type":53,"value":207},{"type":42,"tag":139,"props":2104,"children":2105},{"style":244},[2106],{"type":53,"value":287},{"type":42,"tag":139,"props":2108,"children":2109},{"style":158},[2110],{"type":53,"value":292},{"type":42,"tag":139,"props":2112,"children":2113},{"style":152},[2114],{"type":53,"value":297},{"type":42,"tag":139,"props":2116,"children":2117},{"style":300},[2118],{"type":53,"value":303},{"type":42,"tag":139,"props":2120,"children":2121},{"style":158},[2122],{"type":53,"value":308},{"type":42,"tag":139,"props":2124,"children":2125},{"style":152},[2126],{"type":53,"value":313},{"type":42,"tag":139,"props":2128,"children":2129},{"class":141,"line":316},[2130],{"type":42,"tag":139,"props":2131,"children":2132},{"style":158},[2133],{"type":53,"value":227},{"type":42,"tag":139,"props":2135,"children":2136},{"class":141,"line":324},[2137,2141,2145,2149],{"type":42,"tag":139,"props":2138,"children":2139},{"style":210},[2140],{"type":53,"value":330},{"type":42,"tag":139,"props":2142,"children":2143},{"style":158},[2144],{"type":53,"value":292},{"type":42,"tag":139,"props":2146,"children":2147},{"style":300},[2148],{"type":53,"value":339},{"type":42,"tag":139,"props":2150,"children":2151},{"style":158},[2152],{"type":53,"value":344},{"type":42,"tag":139,"props":2154,"children":2155},{"class":141,"line":347},[2156],{"type":42,"tag":139,"props":2157,"children":2158},{"style":158},[2159],{"type":53,"value":261},{"type":42,"tag":139,"props":2161,"children":2162},{"class":141,"line":355},[2163],{"type":42,"tag":139,"props":2164,"children":2165},{"emptyLinePlaceholder":37},[2166],{"type":53,"value":170},{"type":42,"tag":139,"props":2168,"children":2169},{"class":141,"line":363},[2170,2174,2178,2182],{"type":42,"tag":139,"props":2171,"children":2172},{"style":146},[2173],{"type":53,"value":278},{"type":42,"tag":139,"props":2175,"children":2176},{"style":146},[2177],{"type":53,"value":207},{"type":42,"tag":139,"props":2179,"children":2180},{"style":244},[2181],{"type":53,"value":377},{"type":42,"tag":139,"props":2183,"children":2184},{"style":158},[2185],{"type":53,"value":218},{"type":42,"tag":139,"props":2187,"children":2188},{"class":141,"line":384},[2189],{"type":42,"tag":139,"props":2190,"children":2191},{"style":158},[2192],{"type":53,"value":227},{"type":42,"tag":139,"props":2194,"children":2195},{"class":141,"line":392},[2196,2200,2204,2208,2212,2216],{"type":42,"tag":139,"props":2197,"children":2198},{"style":152},[2199],{"type":53,"value":236},{"type":42,"tag":139,"props":2201,"children":2202},{"style":158},[2203],{"type":53,"value":241},{"type":42,"tag":139,"props":2205,"children":2206},{"style":244},[2207],{"type":53,"value":406},{"type":42,"tag":139,"props":2209,"children":2210},{"style":158},[2211],{"type":53,"value":292},{"type":42,"tag":139,"props":2213,"children":2214},{"style":413},[2215],{"type":53,"value":416},{"type":42,"tag":139,"props":2217,"children":2218},{"style":158},[2219],{"type":53,"value":344},{"type":42,"tag":139,"props":2221,"children":2222},{"class":141,"line":423},[2223],{"type":42,"tag":139,"props":2224,"children":2225},{"emptyLinePlaceholder":37},[2226],{"type":53,"value":170},{"type":42,"tag":139,"props":2228,"children":2229},{"class":141,"line":431},[2230,2234,2238,2242,2246],{"type":42,"tag":139,"props":2231,"children":2232},{"style":146},[2233],{"type":53,"value":437},{"type":42,"tag":139,"props":2235,"children":2236},{"style":244},[2237],{"type":53,"value":442},{"type":42,"tag":139,"props":2239,"children":2240},{"style":158},[2241],{"type":53,"value":292},{"type":42,"tag":139,"props":2243,"children":2244},{"style":413},[2245],{"type":53,"value":416},{"type":42,"tag":139,"props":2247,"children":2248},{"style":158},[2249],{"type":53,"value":344},{"type":42,"tag":139,"props":2251,"children":2252},{"class":141,"line":457},[2253],{"type":42,"tag":139,"props":2254,"children":2255},{"style":158},[2256],{"type":53,"value":261},{"type":42,"tag":139,"props":2258,"children":2259},{"class":141,"line":465},[2260],{"type":42,"tag":139,"props":2261,"children":2262},{"emptyLinePlaceholder":37},[2263],{"type":53,"value":170},{"type":42,"tag":139,"props":2265,"children":2267},{"class":2266,"line":473},[141,1022],[2268,2272,2276,2280],{"type":42,"tag":139,"props":2269,"children":2270},{"style":146},[2271],{"type":53,"value":278},{"type":42,"tag":139,"props":2273,"children":2274},{"style":146},[2275],{"type":53,"value":207},{"type":42,"tag":139,"props":2277,"children":2278},{"style":244},[2279],{"type":53,"value":487},{"type":42,"tag":139,"props":2281,"children":2282},{"style":158},[2283],{"type":53,"value":218},{"type":42,"tag":139,"props":2285,"children":2287},{"class":2286,"line":494},[141,1022],[2288],{"type":42,"tag":139,"props":2289,"children":2290},{"style":158},[2291],{"type":53,"value":227},{"type":42,"tag":139,"props":2293,"children":2295},{"class":2294,"line":502},[141,1022],[2296,2300,2304,2308],{"type":42,"tag":139,"props":2297,"children":2298},{"style":146},[2299],{"type":53,"value":508},{"type":42,"tag":139,"props":2301,"children":2302},{"style":158},[2303],{"type":53,"value":513},{"type":42,"tag":139,"props":2305,"children":2306},{"style":413},[2307],{"type":53,"value":518},{"type":42,"tag":139,"props":2309,"children":2310},{"style":158},[2311],{"type":53,"value":523},{"type":42,"tag":139,"props":2313,"children":2315},{"class":2314,"line":526},[141,1022],[2316,2320],{"type":42,"tag":139,"props":2317,"children":2318},{"style":146},[2319],{"type":53,"value":532},{"type":42,"tag":139,"props":2321,"children":2322},{"style":158},[2323],{"type":53,"value":161},{"type":42,"tag":139,"props":2325,"children":2327},{"class":2326,"line":539},[141,1022],[2328],{"type":42,"tag":139,"props":2329,"children":2330},{"style":158},[2331],{"type":53,"value":545},{"type":42,"tag":139,"props":2333,"children":2335},{"class":2334,"line":548},[141,1022],[2336],{"type":42,"tag":139,"props":2337,"children":2338},{"emptyLinePlaceholder":37},[2339],{"type":53,"value":170},{"type":42,"tag":139,"props":2341,"children":2343},{"class":2342,"line":556},[141,1022],[2344,2348,2352],{"type":42,"tag":139,"props":2345,"children":2346},{"style":146},[2347],{"type":53,"value":437},{"type":42,"tag":139,"props":2349,"children":2350},{"style":564},[2351],{"type":53,"value":567},{"type":42,"tag":139,"props":2353,"children":2354},{"style":158},[2355],{"type":53,"value":161},{"type":42,"tag":139,"props":2357,"children":2359},{"class":2358,"line":574},[141,1022],[2360],{"type":42,"tag":139,"props":2361,"children":2362},{"style":158},[2363],{"type":53,"value":261},{"type":42,"tag":139,"props":2365,"children":2366},{"class":141,"line":582},[2367],{"type":42,"tag":139,"props":2368,"children":2369},{"style":158},[2370],{"type":53,"value":588},{"type":42,"tag":49,"props":2372,"children":2373},{},[2374,2376],{"type":53,"value":2375},"Some time after I created this simple class with the specific problems in mind, I forgot where some of the issues were located. It took me a while to figure out what was wrong. ",{"type":42,"tag":56,"props":2377,"children":2378},{},[2379],{"type":53,"value":2380},"This experience highlights how time-consuming manual code analysis can be.",{"type":42,"tag":49,"props":2382,"children":2383},{},[2384],{"type":42,"tag":102,"props":2385,"children":2387},{"alt":104,"src":2386},"https://cdn.pragmate.dev/wp-content/uploads/2025/02/99740ddd-9f33-4956-9a5f-76ce710b3038.png",[],{"type":42,"tag":49,"props":2389,"children":2390},{},[2391],{"type":53,"value":2392},"In my career, I have already spent a huge amount of time reading through code and searching for problems, whereas PHPStan could identify all of them in less than a second.",{"type":42,"tag":49,"props":2394,"children":2395},{},[2396,2398,2403],{"type":53,"value":2397},"So, why it's worth to use PHPStan? To save time and provide better results. ",{"type":42,"tag":56,"props":2399,"children":2400},{},[2401],{"type":53,"value":2402},"PHPStan gives immediate feedback on the code quality, so developers can fix bugs not only before reaching the production server but even before reaching the repository.",{"type":53,"value":2404}," The tool helps create code that works better, is more compact, and performs tasks with less effort.",{"type":42,"tag":49,"props":2406,"children":2407},{},[2408],{"type":42,"tag":102,"props":2409,"children":2411},{"alt":104,"src":2410},"https://cdn.pragmate.dev/wp-content/uploads/2025/02/93c71baa-15ae-40fa-8ca7-b30768a272e4.png",[],{"type":42,"tag":68,"props":2413,"children":2414},{},[],{"type":42,"tag":72,"props":2416,"children":2418},{"id":2417},"how-to-install-php-stan",[2419],{"type":53,"value":2420},"How to Install PHP Stan?",{"type":42,"tag":49,"props":2422,"children":2423},{},[2424,2426,2434,2436,2443],{"type":53,"value":2425},"The easiest way to ",{"type":42,"tag":91,"props":2427,"children":2431},{"href":2428,"rel":2429},"https://phpstan.org/user-guide/getting-started#installation",[2430],"nofollow",[2432],{"type":53,"value":2433},"install PHP Stan",{"type":53,"value":2435}," is by using Composer. Simply open the terminal, navigate to the WordPress project root directory, and run the following command. If you're not yet familiar with Composer, refer to a guide to get started. [",{"type":42,"tag":91,"props":2437,"children":2440},{"href":2438,"rel":2439},"https://github.com/pragmatedev/vilare/commit/0efca81e8d91d5f4d2544e5c133c2a7281ada5d6",[2430],[2441],{"type":53,"value":2442},"🔗",{"type":53,"value":2444},"]",{"type":42,"tag":129,"props":2446,"children":2450},{"className":2447,"code":2448,"language":2449,"meta":7,"style":7},"language-bash shiki shiki-themes one-dark-pro","composer require --dev phpstan/phpstan\n","bash",[2451],{"type":42,"tag":135,"props":2452,"children":2453},{"__ignoreMap":7},[2454],{"type":42,"tag":139,"props":2455,"children":2456},{"class":141,"line":142},[2457,2462,2467,2472],{"type":42,"tag":139,"props":2458,"children":2459},{"style":244},[2460],{"type":53,"value":2461},"composer",{"type":42,"tag":139,"props":2463,"children":2464},{"style":564},[2465],{"type":53,"value":2466}," require",{"type":42,"tag":139,"props":2468,"children":2469},{"style":413},[2470],{"type":53,"value":2471}," --dev",{"type":42,"tag":139,"props":2473,"children":2474},{"style":564},[2475],{"type":53,"value":2476}," phpstan/phpstan\n",{"type":42,"tag":68,"props":2478,"children":2479},{},[],{"type":42,"tag":72,"props":2481,"children":2483},{"id":2482},"how-to-use-php-stan",[2484],{"type":53,"value":2485},"How to Use PHP Stan?",{"type":42,"tag":49,"props":2487,"children":2488},{},[2489,2491,2497,2499,2505,2507,2513],{"type":53,"value":2490},"To let PHPStan analyze your codebase, you have to use the ",{"type":42,"tag":135,"props":2492,"children":2494},{"className":2493},[],[2495],{"type":53,"value":2496},"analyze",{"type":53,"value":2498}," command and point it to the right directory. For example, if the project's PHP files are located in ",{"type":42,"tag":135,"props":2500,"children":2502},{"className":2501},[],[2503],{"type":53,"value":2504},"app",{"type":53,"value":2506}," and ",{"type":42,"tag":135,"props":2508,"children":2510},{"className":2509},[],[2511],{"type":53,"value":2512},"inc",{"type":53,"value":2514}," folders, you should run the following command 👇 to let PHP Stan analyze the code.",{"type":42,"tag":129,"props":2516,"children":2518},{"className":2447,"code":2517,"language":2449,"meta":7,"style":7},"vendor/bin/phpstan analyze app inc  --memory-limit=2048M\n\n15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%\n\n[OK] No errors\n",[2519],{"type":42,"tag":135,"props":2520,"children":2521},{"__ignoreMap":7},[2522,2550,2557,2570,2577],{"type":42,"tag":139,"props":2523,"children":2524},{"class":141,"line":142},[2525,2530,2535,2540,2545],{"type":42,"tag":139,"props":2526,"children":2527},{"style":244},[2528],{"type":53,"value":2529},"vendor/bin/phpstan",{"type":42,"tag":139,"props":2531,"children":2532},{"style":564},[2533],{"type":53,"value":2534}," analyze",{"type":42,"tag":139,"props":2536,"children":2537},{"style":564},[2538],{"type":53,"value":2539}," app",{"type":42,"tag":139,"props":2541,"children":2542},{"style":564},[2543],{"type":53,"value":2544}," inc",{"type":42,"tag":139,"props":2546,"children":2547},{"style":413},[2548],{"type":53,"value":2549},"  --memory-limit=2048M\n",{"type":42,"tag":139,"props":2551,"children":2552},{"class":141,"line":164},[2553],{"type":42,"tag":139,"props":2554,"children":2555},{"emptyLinePlaceholder":37},[2556],{"type":53,"value":170},{"type":42,"tag":139,"props":2558,"children":2559},{"class":141,"line":173},[2560,2565],{"type":42,"tag":139,"props":2561,"children":2562},{"style":244},[2563],{"type":53,"value":2564},"15/15",{"type":42,"tag":139,"props":2566,"children":2567},{"style":158},[2568],{"type":53,"value":2569}," [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%\n",{"type":42,"tag":139,"props":2571,"children":2572},{"class":141,"line":187},[2573],{"type":42,"tag":139,"props":2574,"children":2575},{"emptyLinePlaceholder":37},[2576],{"type":53,"value":170},{"type":42,"tag":139,"props":2578,"children":2579},{"class":141,"line":196},[2580],{"type":42,"tag":139,"props":2581,"children":2582},{"style":158},[2583],{"type":53,"value":2584},"[OK] No errors\n",{"type":42,"tag":49,"props":2586,"children":2587},{},[2588],{"type":53,"value":2589},"The tool verified all the PHP files located there and informed that there's no error to fix yet.",{"type":42,"tag":49,"props":2591,"children":2592},{},[2593,2595,2601,2603,2609],{"type":53,"value":2594},"To make using the tool easier, add a script to your project's ",{"type":42,"tag":135,"props":2596,"children":2598},{"className":2597},[],[2599],{"type":53,"value":2600},"composer.json",{"type":53,"value":2602}," file. This will allow you to run PHP Stan with a simple ",{"type":42,"tag":135,"props":2604,"children":2606},{"className":2605},[],[2607],{"type":53,"value":2608},"composer analyze",{"type":53,"value":2610}," command rather than the longer version.",{"type":42,"tag":2612,"props":2613,"children":2615},"ide",{":tabs":2614},"[\"composer.json\", \"Terminal\"]",[2616,2723],{"type":42,"tag":129,"props":2617,"children":2622},{"className":2618,"code":2619,"filename":2600,"highlights":2620,"language":2621,"meta":7,"style":7},"language-json shiki shiki-themes one-dark-pro","{\n  \"scripts\": {\n    \"lint\": \"phpcs\",\n    \"format\": \"phpcbf\",\n    \"analyze\": \"phpstan analyse app inc --memory-limit=2048M\"\n  },\n}\n",[196],"json",[2623],{"type":42,"tag":135,"props":2624,"children":2625},{"__ignoreMap":7},[2626,2633,2646,2669,2690,2708,2716],{"type":42,"tag":139,"props":2627,"children":2628},{"class":141,"line":142},[2629],{"type":42,"tag":139,"props":2630,"children":2631},{"style":158},[2632],{"type":53,"value":193},{"type":42,"tag":139,"props":2634,"children":2635},{"class":141,"line":164},[2636,2641],{"type":42,"tag":139,"props":2637,"children":2638},{"style":300},[2639],{"type":53,"value":2640},"  \"scripts\"",{"type":42,"tag":139,"props":2642,"children":2643},{"style":158},[2644],{"type":53,"value":2645},": {\n",{"type":42,"tag":139,"props":2647,"children":2648},{"class":141,"line":173},[2649,2654,2659,2664],{"type":42,"tag":139,"props":2650,"children":2651},{"style":300},[2652],{"type":53,"value":2653},"    \"lint\"",{"type":42,"tag":139,"props":2655,"children":2656},{"style":158},[2657],{"type":53,"value":2658},": ",{"type":42,"tag":139,"props":2660,"children":2661},{"style":564},[2662],{"type":53,"value":2663},"\"phpcs\"",{"type":42,"tag":139,"props":2665,"children":2666},{"style":158},[2667],{"type":53,"value":2668},",\n",{"type":42,"tag":139,"props":2670,"children":2671},{"class":141,"line":187},[2672,2677,2681,2686],{"type":42,"tag":139,"props":2673,"children":2674},{"style":300},[2675],{"type":53,"value":2676},"    \"format\"",{"type":42,"tag":139,"props":2678,"children":2679},{"style":158},[2680],{"type":53,"value":2658},{"type":42,"tag":139,"props":2682,"children":2683},{"style":564},[2684],{"type":53,"value":2685},"\"phpcbf\"",{"type":42,"tag":139,"props":2687,"children":2688},{"style":158},[2689],{"type":53,"value":2668},{"type":42,"tag":139,"props":2691,"children":2693},{"class":2692,"line":196},[141,1022],[2694,2699,2703],{"type":42,"tag":139,"props":2695,"children":2696},{"style":300},[2697],{"type":53,"value":2698},"    \"analyze\"",{"type":42,"tag":139,"props":2700,"children":2701},{"style":158},[2702],{"type":53,"value":2658},{"type":42,"tag":139,"props":2704,"children":2705},{"style":564},[2706],{"type":53,"value":2707},"\"phpstan analyse app inc --memory-limit=2048M\"\n",{"type":42,"tag":139,"props":2709,"children":2710},{"class":141,"line":221},[2711],{"type":42,"tag":139,"props":2712,"children":2713},{"style":158},[2714],{"type":53,"value":2715},"  },\n",{"type":42,"tag":139,"props":2717,"children":2718},{"class":141,"line":230},[2719],{"type":42,"tag":139,"props":2720,"children":2721},{"style":158},[2722],{"type":53,"value":588},{"type":42,"tag":129,"props":2724,"children":2727},{"className":2447,"code":2725,"filename":2726,"language":2449,"meta":7,"style":7},"composer analyze\n\n15/15 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%\n\n[OK] No errors\n","Terminal",[2728],{"type":42,"tag":135,"props":2729,"children":2730},{"__ignoreMap":7},[2731,2743,2750,2761,2768],{"type":42,"tag":139,"props":2732,"children":2733},{"class":141,"line":142},[2734,2738],{"type":42,"tag":139,"props":2735,"children":2736},{"style":244},[2737],{"type":53,"value":2461},{"type":42,"tag":139,"props":2739,"children":2740},{"style":564},[2741],{"type":53,"value":2742}," analyze\n",{"type":42,"tag":139,"props":2744,"children":2745},{"class":141,"line":164},[2746],{"type":42,"tag":139,"props":2747,"children":2748},{"emptyLinePlaceholder":37},[2749],{"type":53,"value":170},{"type":42,"tag":139,"props":2751,"children":2752},{"class":141,"line":173},[2753,2757],{"type":42,"tag":139,"props":2754,"children":2755},{"style":244},[2756],{"type":53,"value":2564},{"type":42,"tag":139,"props":2758,"children":2759},{"style":158},[2760],{"type":53,"value":2569},{"type":42,"tag":139,"props":2762,"children":2763},{"class":141,"line":187},[2764],{"type":42,"tag":139,"props":2765,"children":2766},{"emptyLinePlaceholder":37},[2767],{"type":53,"value":170},{"type":42,"tag":139,"props":2769,"children":2770},{"class":141,"line":196},[2771],{"type":42,"tag":139,"props":2772,"children":2773},{"style":158},[2774],{"type":53,"value":2584},{"type":42,"tag":68,"props":2776,"children":2777},{},[],{"type":42,"tag":72,"props":2779,"children":2781},{"id":2780},"how-to-configure-php-stan",[2782],{"type":53,"value":2783},"How to Configure PHP Stan?",{"type":42,"tag":49,"props":2785,"children":2786},{},[2787,2789,2796,2798,2804,2806,2811],{"type":53,"value":2788},"Instead of setting up the tool each time with ",{"type":42,"tag":91,"props":2790,"children":2793},{"href":2791,"rel":2792},"https://phpstan.org/user-guide/command-line-usage",[2430],[2794],{"type":53,"value":2795},"command-line arguments",{"type":53,"value":2797},", you can simplify this process by creating a project configuration file named ",{"type":42,"tag":135,"props":2799,"children":2801},{"className":2800},[],[2802],{"type":53,"value":2803},"phpstan.neon",{"type":53,"value":2805},". This file is automatically resolved when you run the ",{"type":42,"tag":135,"props":2807,"children":2809},{"className":2808},[],[2810],{"type":53,"value":2496},{"type":53,"value":2812}," command.",{"type":42,"tag":129,"props":2814,"children":2818},{"className":2815,"code":2816,"filename":2803,"language":2817,"meta":7,"style":7},"language-yaml shiki shiki-themes one-dark-pro","parameters:\n    level: 6\n    paths:\n        - inc\n        - app\n","yaml",[2819],{"type":42,"tag":135,"props":2820,"children":2821},{"__ignoreMap":7},[2822,2835,2852,2864,2877],{"type":42,"tag":139,"props":2823,"children":2824},{"class":141,"line":142},[2825,2830],{"type":42,"tag":139,"props":2826,"children":2827},{"style":300},[2828],{"type":53,"value":2829},"parameters",{"type":42,"tag":139,"props":2831,"children":2832},{"style":158},[2833],{"type":53,"value":2834},":\n",{"type":42,"tag":139,"props":2836,"children":2837},{"class":141,"line":164},[2838,2843,2847],{"type":42,"tag":139,"props":2839,"children":2840},{"style":300},[2841],{"type":53,"value":2842},"    level",{"type":42,"tag":139,"props":2844,"children":2845},{"style":158},[2846],{"type":53,"value":2658},{"type":42,"tag":139,"props":2848,"children":2849},{"style":413},[2850],{"type":53,"value":2851},"6\n",{"type":42,"tag":139,"props":2853,"children":2854},{"class":141,"line":173},[2855,2860],{"type":42,"tag":139,"props":2856,"children":2857},{"style":300},[2858],{"type":53,"value":2859},"    paths",{"type":42,"tag":139,"props":2861,"children":2862},{"style":158},[2863],{"type":53,"value":2834},{"type":42,"tag":139,"props":2865,"children":2866},{"class":141,"line":187},[2867,2872],{"type":42,"tag":139,"props":2868,"children":2869},{"style":158},[2870],{"type":53,"value":2871},"        - ",{"type":42,"tag":139,"props":2873,"children":2874},{"style":564},[2875],{"type":53,"value":2876},"inc\n",{"type":42,"tag":139,"props":2878,"children":2879},{"class":141,"line":196},[2880,2884],{"type":42,"tag":139,"props":2881,"children":2882},{"style":158},[2883],{"type":53,"value":2871},{"type":42,"tag":139,"props":2885,"children":2886},{"style":564},[2887],{"type":53,"value":2888},"app\n",{"type":42,"tag":49,"props":2890,"children":2891},{},[2892,2894,2899,2901,2907],{"type":53,"value":2893},"For instance, ",{"type":42,"tag":56,"props":2895,"children":2896},{},[2897],{"type":53,"value":2898},"rather than repeatedly typing in directory paths in the command line whenever you want to inspect the code, you can list these directories once in the configuration file",{"type":53,"value":2900},". There are many other settings, so be sure to check ",{"type":42,"tag":91,"props":2902,"children":2904},{"href":2791,"rel":2903},[2430],[2905],{"type":53,"value":2906},"the documentation",{"type":53,"value":62},{"type":42,"tag":68,"props":2909,"children":2910},{},[],{"type":42,"tag":72,"props":2912,"children":2914},{"id":2913},"how-to-ignore-php-stan-errors",[2915],{"type":53,"value":2916},"How to Ignore PHP Stan Errors?",{"type":42,"tag":49,"props":2918,"children":2919},{},[2920],{"type":53,"value":2921},"You might want to ignore some errors found by PHPStan for various reasons, for instance, you can’t find the stubs you’re looking for or it’s a known bug and you don’t have time to wait for a bugfix. Fortunately, there are a few ways to handle this.",{"type":42,"tag":2923,"props":2924,"children":2925},"ol",{},[2926,2973,2995],{"type":42,"tag":2927,"props":2928,"children":2929},"li",{},[2930,2932,2939,2941,2947,2949,2955,2957,2963,2965,2971],{"type":53,"value":2931},"Comments: By ",{"type":42,"tag":91,"props":2933,"children":2936},{"href":2934,"rel":2935},"https://phpstan.org/user-guide/ignoring-errors#ignoring-in-code-using-phpdocs",[2430],[2937],{"type":53,"value":2938},"comments",{"type":53,"value":2940}," as with other analysis tools like ",{"type":42,"tag":91,"props":2942,"children":2944},{"href":2943},"/php/phpcs/#how-to-ignore-php-code-sniffer-errors",[2945],{"type":53,"value":2946},"phpcs",{"type":53,"value":2948},", ",{"type":42,"tag":91,"props":2950,"children":2952},{"href":2951},"/js/eslint/#how-to-ignore-errors-in-eslint",[2953],{"type":53,"value":2954},"eslint",{"type":53,"value":2956},", or ",{"type":42,"tag":91,"props":2958,"children":2960},{"href":2959},"/css/stylelint/#how-to-ignore-errors-in-stylelint",[2961],{"type":53,"value":2962},"stylelint",{"type":53,"value":2964},". Put the ",{"type":42,"tag":135,"props":2966,"children":2968},{"className":2967},[],[2969],{"type":53,"value":2970},"@phpstan-ignore",{"type":53,"value":2972}," comment near the line you want to ignore and specify the error code.",{"type":42,"tag":2927,"props":2974,"children":2975},{},[2976,2978,2985,2987,2993],{"type":53,"value":2977},"Configuration: By regular expressions in the ",{"type":42,"tag":91,"props":2979,"children":2982},{"href":2980,"rel":2981},"https://phpstan.org/config-reference",[2430],[2983],{"type":53,"value":2984},"configuration file",{"type":53,"value":2986}," under the ",{"type":42,"tag":135,"props":2988,"children":2990},{"className":2989},[],[2991],{"type":53,"value":2992},"ignoreErrors",{"type":53,"value":2994}," key.",{"type":42,"tag":2927,"props":2996,"children":2997},{},[2998,3000,3007],{"type":53,"value":2999},"Baseline: Since I'm less familiar with this, I recommend referring to ",{"type":42,"tag":91,"props":3001,"children":3004},{"href":3002,"rel":3003},"https://phpstan.org/user-guide/ignoring-errors#reporting-unused-ignores",[2430],[3005],{"type":53,"value":3006},"the official docs",{"type":53,"value":62},{"type":42,"tag":129,"props":3009,"children":3011},{"className":131,"code":3010,"language":5,"meta":7,"style":7},"// @phpstan-ignore-next-line variable.undefined\necho $foo;\n\necho $foo; // @phpstan-ignore variable.undefined\n",[3012],{"type":42,"tag":135,"props":3013,"children":3014},{"__ignoreMap":7},[3015,3024,3041,3048],{"type":42,"tag":139,"props":3016,"children":3017},{"class":141,"line":142},[3018],{"type":42,"tag":139,"props":3019,"children":3021},{"style":3020},"--shiki-default:#7F848E;--shiki-default-font-style:italic",[3022],{"type":53,"value":3023},"// @phpstan-ignore-next-line variable.undefined\n",{"type":42,"tag":139,"props":3025,"children":3026},{"class":141,"line":164},[3027,3032,3037],{"type":42,"tag":139,"props":3028,"children":3029},{"style":210},[3030],{"type":53,"value":3031},"echo",{"type":42,"tag":139,"props":3033,"children":3034},{"style":300},[3035],{"type":53,"value":3036}," $foo",{"type":42,"tag":139,"props":3038,"children":3039},{"style":158},[3040],{"type":53,"value":161},{"type":42,"tag":139,"props":3042,"children":3043},{"class":141,"line":173},[3044],{"type":42,"tag":139,"props":3045,"children":3046},{"emptyLinePlaceholder":37},[3047],{"type":53,"value":170},{"type":42,"tag":139,"props":3049,"children":3050},{"class":141,"line":187},[3051,3055,3059,3064],{"type":42,"tag":139,"props":3052,"children":3053},{"style":210},[3054],{"type":53,"value":3031},{"type":42,"tag":139,"props":3056,"children":3057},{"style":300},[3058],{"type":53,"value":3036},{"type":42,"tag":139,"props":3060,"children":3061},{"style":158},[3062],{"type":53,"value":3063},"; ",{"type":42,"tag":139,"props":3065,"children":3066},{"style":3020},[3067],{"type":53,"value":3068},"// @phpstan-ignore variable.undefined\n",{"type":42,"tag":68,"props":3070,"children":3071},{},[],{"type":42,"tag":72,"props":3073,"children":3075},{"id":3074},"how-to-use-php-stan-with-wordpress",[3076],{"type":53,"value":3077},"How to Use PHP Stan with WordPress?",{"type":42,"tag":49,"props":3079,"children":3080},{},[3081,3083,3088,3090,3095],{"type":53,"value":3082},"Running ",{"type":42,"tag":135,"props":3084,"children":3086},{"className":3085},[],[3087],{"type":53,"value":2608},{"type":53,"value":3089}," command in our WordPress theme in the current state causes many errors, mostly related to undefined WordPress functions. That’s because ",{"type":42,"tag":56,"props":3091,"children":3092},{},[3093],{"type":53,"value":3094},"a few more steps are needed to ensure PHPStan works in WordPress",{"type":53,"value":62},{"type":42,"tag":49,"props":3097,"children":3098},{},[3099],{"type":42,"tag":102,"props":3100,"children":3102},{"alt":104,"src":3101},"https://cdn.pragmate.dev/wp-content/uploads/2025/02/65760c4a-a27e-4e7d-bf02-caf88786b2b0.png",[],{"type":42,"tag":49,"props":3104,"children":3105},{},[3106,3108,3113,3114,3119],{"type":53,"value":3107},"The current configuration tells PHPStan to check only the ",{"type":42,"tag":135,"props":3109,"children":3111},{"className":3110},[],[3112],{"type":53,"value":2504},{"type":53,"value":2506},{"type":42,"tag":135,"props":3115,"children":3117},{"className":3116},[],[3118],{"type":53,"value":2512},{"type":53,"value":3120}," directories, but WordPress functions are not defined there. They are defined in other layers, higher in the hierarchy, so PHPStan doesn’t recognize them.",{"type":42,"tag":49,"props":3122,"children":3123},{},[3124,3137,3139,3145,3147,3153,3155,3161],{"type":42,"tag":56,"props":3125,"children":3126},{},[3127,3129,3136],{"type":53,"value":3128},"To fix this, you'll need to install and load a ",{"type":42,"tag":91,"props":3130,"children":3133},{"href":3131,"rel":3132},"https://github.com/szepeviktor/phpstan-wordpress",[2430],[3134],{"type":53,"value":3135},"WordPress extension for PHPStan",{"type":53,"value":62},{"type":53,"value":3138}," Navigate to the theme’s root, install the extension ",{"type":42,"tag":91,"props":3140,"children":3142},{"href":3141},"/php/composer/",[3143],{"type":53,"value":3144},"using composer",{"type":53,"value":3146}," with the command above, and include its ",{"type":42,"tag":135,"props":3148,"children":3150},{"className":3149},[],[3151],{"type":53,"value":3152},"extension.neon",{"type":53,"value":3154}," in the configuration file within the ",{"type":42,"tag":135,"props":3156,"children":3158},{"className":3157},[],[3159],{"type":53,"value":3160},"includes",{"type":53,"value":3162}," property.",{"type":42,"tag":129,"props":3164,"children":3166},{"className":2447,"code":3165,"language":2449,"meta":7,"style":7},"composer require --dev szepeviktor/phpstan-wordpress\n",[3167],{"type":42,"tag":135,"props":3168,"children":3169},{"__ignoreMap":7},[3170],{"type":42,"tag":139,"props":3171,"children":3172},{"class":141,"line":142},[3173,3177,3181,3185],{"type":42,"tag":139,"props":3174,"children":3175},{"style":244},[3176],{"type":53,"value":2461},{"type":42,"tag":139,"props":3178,"children":3179},{"style":564},[3180],{"type":53,"value":2466},{"type":42,"tag":139,"props":3182,"children":3183},{"style":413},[3184],{"type":53,"value":2471},{"type":42,"tag":139,"props":3186,"children":3187},{"style":564},[3188],{"type":53,"value":3189}," szepeviktor/phpstan-wordpress\n",{"type":42,"tag":129,"props":3191,"children":3194},{"className":2815,"code":3192,"filename":2803,"highlights":3193,"language":2817,"meta":7,"style":7},"parameters:\n    level: 6\n    paths:\n        - inc\n        - app\nincludes:\n    - vendor/szepeviktor/phpstan-wordpress/extension.neon\n",[230],[3195],{"type":42,"tag":135,"props":3196,"children":3197},{"__ignoreMap":7},[3198,3209,3224,3235,3246,3257,3268],{"type":42,"tag":139,"props":3199,"children":3200},{"class":141,"line":142},[3201,3205],{"type":42,"tag":139,"props":3202,"children":3203},{"style":300},[3204],{"type":53,"value":2829},{"type":42,"tag":139,"props":3206,"children":3207},{"style":158},[3208],{"type":53,"value":2834},{"type":42,"tag":139,"props":3210,"children":3211},{"class":141,"line":164},[3212,3216,3220],{"type":42,"tag":139,"props":3213,"children":3214},{"style":300},[3215],{"type":53,"value":2842},{"type":42,"tag":139,"props":3217,"children":3218},{"style":158},[3219],{"type":53,"value":2658},{"type":42,"tag":139,"props":3221,"children":3222},{"style":413},[3223],{"type":53,"value":2851},{"type":42,"tag":139,"props":3225,"children":3226},{"class":141,"line":173},[3227,3231],{"type":42,"tag":139,"props":3228,"children":3229},{"style":300},[3230],{"type":53,"value":2859},{"type":42,"tag":139,"props":3232,"children":3233},{"style":158},[3234],{"type":53,"value":2834},{"type":42,"tag":139,"props":3236,"children":3237},{"class":141,"line":187},[3238,3242],{"type":42,"tag":139,"props":3239,"children":3240},{"style":158},[3241],{"type":53,"value":2871},{"type":42,"tag":139,"props":3243,"children":3244},{"style":564},[3245],{"type":53,"value":2876},{"type":42,"tag":139,"props":3247,"children":3248},{"class":141,"line":196},[3249,3253],{"type":42,"tag":139,"props":3250,"children":3251},{"style":158},[3252],{"type":53,"value":2871},{"type":42,"tag":139,"props":3254,"children":3255},{"style":564},[3256],{"type":53,"value":2888},{"type":42,"tag":139,"props":3258,"children":3259},{"class":141,"line":221},[3260,3264],{"type":42,"tag":139,"props":3261,"children":3262},{"style":300},[3263],{"type":53,"value":3160},{"type":42,"tag":139,"props":3265,"children":3266},{"style":158},[3267],{"type":53,"value":2834},{"type":42,"tag":139,"props":3269,"children":3271},{"class":3270,"line":230},[141,1022],[3272,3277],{"type":42,"tag":139,"props":3273,"children":3274},{"style":158},[3275],{"type":53,"value":3276},"    - ",{"type":42,"tag":139,"props":3278,"children":3279},{"style":564},[3280],{"type":53,"value":3281},"vendor/szepeviktor/phpstan-wordpress/extension.neon\n",{"type":42,"tag":49,"props":3283,"children":3284},{},[3285],{"type":53,"value":3286},"When you run the tool now, there are no more errors about missing WordPress functions. However, there are other errors indicating that something is missing. They are related to the constants defined in the theme, so why are they not resolved?",{"type":42,"tag":49,"props":3288,"children":3289},{},[3290],{"type":42,"tag":102,"props":3291,"children":3293},{"alt":104,"src":3292},"https://cdn.pragmate.dev/wp-content/uploads/2025/02/14e1044b-b719-4250-bca7-eabdbcc8bab8.png",[],{"type":42,"tag":49,"props":3295,"children":3296},{},[3297,3299,3304,3305,3310,3312,3319,3321],{"type":53,"value":3298},"That’s again the matter of the tool configuration, which tells PHP Stan to check only the ",{"type":42,"tag":135,"props":3300,"children":3302},{"className":3301},[],[3303],{"type":53,"value":2504},{"type":53,"value":2506},{"type":42,"tag":135,"props":3306,"children":3308},{"className":3307},[],[3309],{"type":53,"value":2512},{"type":53,"value":3311}," directories of the theme, while the missing constants are defined in the ",{"type":42,"tag":91,"props":3313,"children":3316},{"href":3314,"rel":3315},"https://github.com/pragmatedev/vilare/blob/master/resources/functions.php",[2430],[3317],{"type":53,"value":3318},"theme's entry file",{"type":53,"value":3320},", which is located elsewhere. ",{"type":42,"tag":56,"props":3322,"children":3323},{},[3324,3326,3332],{"type":53,"value":3325},"To address this, include the files that should be loaded before the analyzing process in the ",{"type":42,"tag":135,"props":3327,"children":3329},{"className":3328},[],[3330],{"type":53,"value":3331},"bootstrapFile",{"type":53,"value":3333}," key of the configuration.",{"type":42,"tag":129,"props":3335,"children":3338},{"className":2815,"code":3336,"filename":2803,"highlights":3337,"language":2817,"meta":7,"style":7},"parameters:\n    level: 5\n    paths:\n        - inc\n        - app\n    bootstrapFiles:\n        - resources/functions.php\nincludes:\n    - vendor/szepeviktor/phpstan-wordpress/extension.neon\n",[221,230],[3339],{"type":42,"tag":135,"props":3340,"children":3341},{"__ignoreMap":7},[3342,3353,3369,3380,3391,3402,3415,3428,3439],{"type":42,"tag":139,"props":3343,"children":3344},{"class":141,"line":142},[3345,3349],{"type":42,"tag":139,"props":3346,"children":3347},{"style":300},[3348],{"type":53,"value":2829},{"type":42,"tag":139,"props":3350,"children":3351},{"style":158},[3352],{"type":53,"value":2834},{"type":42,"tag":139,"props":3354,"children":3355},{"class":141,"line":164},[3356,3360,3364],{"type":42,"tag":139,"props":3357,"children":3358},{"style":300},[3359],{"type":53,"value":2842},{"type":42,"tag":139,"props":3361,"children":3362},{"style":158},[3363],{"type":53,"value":2658},{"type":42,"tag":139,"props":3365,"children":3366},{"style":413},[3367],{"type":53,"value":3368},"5\n",{"type":42,"tag":139,"props":3370,"children":3371},{"class":141,"line":173},[3372,3376],{"type":42,"tag":139,"props":3373,"children":3374},{"style":300},[3375],{"type":53,"value":2859},{"type":42,"tag":139,"props":3377,"children":3378},{"style":158},[3379],{"type":53,"value":2834},{"type":42,"tag":139,"props":3381,"children":3382},{"class":141,"line":187},[3383,3387],{"type":42,"tag":139,"props":3384,"children":3385},{"style":158},[3386],{"type":53,"value":2871},{"type":42,"tag":139,"props":3388,"children":3389},{"style":564},[3390],{"type":53,"value":2876},{"type":42,"tag":139,"props":3392,"children":3393},{"class":141,"line":196},[3394,3398],{"type":42,"tag":139,"props":3395,"children":3396},{"style":158},[3397],{"type":53,"value":2871},{"type":42,"tag":139,"props":3399,"children":3400},{"style":564},[3401],{"type":53,"value":2888},{"type":42,"tag":139,"props":3403,"children":3405},{"class":3404,"line":221},[141,1022],[3406,3411],{"type":42,"tag":139,"props":3407,"children":3408},{"style":300},[3409],{"type":53,"value":3410},"    bootstrapFiles",{"type":42,"tag":139,"props":3412,"children":3413},{"style":158},[3414],{"type":53,"value":2834},{"type":42,"tag":139,"props":3416,"children":3418},{"class":3417,"line":230},[141,1022],[3419,3423],{"type":42,"tag":139,"props":3420,"children":3421},{"style":158},[3422],{"type":53,"value":2871},{"type":42,"tag":139,"props":3424,"children":3425},{"style":564},[3426],{"type":53,"value":3427},"resources/functions.php\n",{"type":42,"tag":139,"props":3429,"children":3430},{"class":141,"line":255},[3431,3435],{"type":42,"tag":139,"props":3432,"children":3433},{"style":300},[3434],{"type":53,"value":3160},{"type":42,"tag":139,"props":3436,"children":3437},{"style":158},[3438],{"type":53,"value":2834},{"type":42,"tag":139,"props":3440,"children":3441},{"class":141,"line":264},[3442,3446],{"type":42,"tag":139,"props":3443,"children":3444},{"style":158},[3445],{"type":53,"value":3276},{"type":42,"tag":139,"props":3447,"children":3448},{"style":564},[3449],{"type":53,"value":3281},{"type":42,"tag":49,"props":3451,"children":3452},{},[3453,3455],{"type":53,"value":3454},"Running the analysis process in its current form produces significantly fewer errors. ",{"type":42,"tag":56,"props":3456,"children":3457},{},[3458],{"type":53,"value":3459},"The remaining issues are tied to the codebase and require manual resolution.",{"type":42,"tag":49,"props":3461,"children":3462},{},[3463],{"type":42,"tag":102,"props":3464,"children":3465},{"alt":104,"src":105},[],{"type":42,"tag":68,"props":3467,"children":3468},{},[],{"type":42,"tag":72,"props":3470,"children":3472},{"id":3471},"how-to-use-php-stan-with-acf",[3473],{"type":53,"value":3474},"How to Use PHP Stan with ACF?",{"type":42,"tag":49,"props":3476,"children":3477},{},[3478,3485,3487],{"type":42,"tag":91,"props":3479,"children":3482},{"href":3480,"rel":3481},"https://www.advancedcustomfields.com/",[2430],[3483],{"type":53,"value":3484},"Advanced Custom Fields",{"type":53,"value":3486}," is a popular plugin often integrated in themes or plugins. ",{"type":42,"tag":56,"props":3488,"children":3489},{},[3490,3492,3498,3500,3507],{"type":53,"value":3491},"To solve problems with missing ACF functions like ",{"type":42,"tag":135,"props":3493,"children":3495},{"className":3494},[],[3496],{"type":53,"value":3497},"get_field",{"type":53,"value":3499}," in PHP Stan, install ",{"type":42,"tag":91,"props":3501,"children":3504},{"href":3502,"rel":3503},"https://github.com/php-stubs/acf-pro-stubs",[2430],[3505],{"type":53,"value":3506},"ACF stub files",{"type":53,"value":3508}," and include them in the tool configuration file.",{"type":42,"tag":129,"props":3510,"children":3512},{"className":2447,"code":3511,"language":2449,"meta":7,"style":7},"composer require --dev php-stubs/acf-pro-stubs\n",[3513],{"type":42,"tag":135,"props":3514,"children":3515},{"__ignoreMap":7},[3516],{"type":42,"tag":139,"props":3517,"children":3518},{"class":141,"line":142},[3519,3523,3527,3531],{"type":42,"tag":139,"props":3520,"children":3521},{"style":244},[3522],{"type":53,"value":2461},{"type":42,"tag":139,"props":3524,"children":3525},{"style":564},[3526],{"type":53,"value":2466},{"type":42,"tag":139,"props":3528,"children":3529},{"style":413},[3530],{"type":53,"value":2471},{"type":42,"tag":139,"props":3532,"children":3533},{"style":564},[3534],{"type":53,"value":3535}," php-stubs/acf-pro-stubs\n",{"type":42,"tag":129,"props":3537,"children":3540},{"className":2815,"code":3538,"filename":2803,"highlights":3539,"language":2817,"meta":7,"style":7},"parameters:\n    level: 5\n    paths:\n        - inc\n        - app\n    bootstrapFiles:\n        - resources/functions.php\n    scanFiles:\n        - vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php\nincludes:\n    - vendor/szepeviktor/phpstan-wordpress/extension.neon\n",[255,264],[3541],{"type":42,"tag":135,"props":3542,"children":3543},{"__ignoreMap":7},[3544,3555,3570,3581,3592,3603,3614,3625,3638,3651,3662],{"type":42,"tag":139,"props":3545,"children":3546},{"class":141,"line":142},[3547,3551],{"type":42,"tag":139,"props":3548,"children":3549},{"style":300},[3550],{"type":53,"value":2829},{"type":42,"tag":139,"props":3552,"children":3553},{"style":158},[3554],{"type":53,"value":2834},{"type":42,"tag":139,"props":3556,"children":3557},{"class":141,"line":164},[3558,3562,3566],{"type":42,"tag":139,"props":3559,"children":3560},{"style":300},[3561],{"type":53,"value":2842},{"type":42,"tag":139,"props":3563,"children":3564},{"style":158},[3565],{"type":53,"value":2658},{"type":42,"tag":139,"props":3567,"children":3568},{"style":413},[3569],{"type":53,"value":3368},{"type":42,"tag":139,"props":3571,"children":3572},{"class":141,"line":173},[3573,3577],{"type":42,"tag":139,"props":3574,"children":3575},{"style":300},[3576],{"type":53,"value":2859},{"type":42,"tag":139,"props":3578,"children":3579},{"style":158},[3580],{"type":53,"value":2834},{"type":42,"tag":139,"props":3582,"children":3583},{"class":141,"line":187},[3584,3588],{"type":42,"tag":139,"props":3585,"children":3586},{"style":158},[3587],{"type":53,"value":2871},{"type":42,"tag":139,"props":3589,"children":3590},{"style":564},[3591],{"type":53,"value":2876},{"type":42,"tag":139,"props":3593,"children":3594},{"class":141,"line":196},[3595,3599],{"type":42,"tag":139,"props":3596,"children":3597},{"style":158},[3598],{"type":53,"value":2871},{"type":42,"tag":139,"props":3600,"children":3601},{"style":564},[3602],{"type":53,"value":2888},{"type":42,"tag":139,"props":3604,"children":3605},{"class":141,"line":221},[3606,3610],{"type":42,"tag":139,"props":3607,"children":3608},{"style":300},[3609],{"type":53,"value":3410},{"type":42,"tag":139,"props":3611,"children":3612},{"style":158},[3613],{"type":53,"value":2834},{"type":42,"tag":139,"props":3615,"children":3616},{"class":141,"line":230},[3617,3621],{"type":42,"tag":139,"props":3618,"children":3619},{"style":158},[3620],{"type":53,"value":2871},{"type":42,"tag":139,"props":3622,"children":3623},{"style":564},[3624],{"type":53,"value":3427},{"type":42,"tag":139,"props":3626,"children":3628},{"class":3627,"line":255},[141,1022],[3629,3634],{"type":42,"tag":139,"props":3630,"children":3631},{"style":300},[3632],{"type":53,"value":3633},"    scanFiles",{"type":42,"tag":139,"props":3635,"children":3636},{"style":158},[3637],{"type":53,"value":2834},{"type":42,"tag":139,"props":3639,"children":3641},{"class":3640,"line":264},[141,1022],[3642,3646],{"type":42,"tag":139,"props":3643,"children":3644},{"style":158},[3645],{"type":53,"value":2871},{"type":42,"tag":139,"props":3647,"children":3648},{"style":564},[3649],{"type":53,"value":3650},"vendor/php-stubs/acf-pro-stubs/acf-pro-stubs.php\n",{"type":42,"tag":139,"props":3652,"children":3653},{"class":141,"line":272},[3654,3658],{"type":42,"tag":139,"props":3655,"children":3656},{"style":300},[3657],{"type":53,"value":3160},{"type":42,"tag":139,"props":3659,"children":3660},{"style":158},[3661],{"type":53,"value":2834},{"type":42,"tag":139,"props":3663,"children":3664},{"class":141,"line":316},[3665,3669],{"type":42,"tag":139,"props":3666,"children":3667},{"style":158},[3668],{"type":53,"value":3276},{"type":42,"tag":139,"props":3670,"children":3671},{"style":564},[3672],{"type":53,"value":3281},{"type":42,"tag":49,"props":3674,"children":3675},{},[3676,3678,3683],{"type":53,"value":3677},"This problem highlights the matter of dependency hell. ",{"type":42,"tag":56,"props":3679,"children":3680},{},[3681],{"type":53,"value":3682},"The more external methods and classes you integrate into your WordPress project, the more stubs you'll need to add.",{"type":53,"value":3684}," To find them, try searching for the plugin name along with \"stubs\" on Google. If you can't find the required stubs, consider ignoring certain types of errors, as explained in the next section.",{"type":42,"tag":68,"props":3686,"children":3687},{},[],{"type":42,"tag":72,"props":3689,"children":3691},{"id":3690},"how-to-use-php-stan-with-vs-code",[3692],{"type":53,"value":3693},"How to Use PHP Stan with VS Code?",{"type":42,"tag":49,"props":3695,"children":3696},{},[3697,3699,3705,3706,3712,3713,3718,3720,3727,3729],{"type":53,"value":3698},"Like other linters such as ",{"type":42,"tag":91,"props":3700,"children":3702},{"href":3701},"/css/stylelint/#how-to-integrate-stylelint-with-vs-code",[3703],{"type":53,"value":3704},"Stylelint",{"type":53,"value":2948},{"type":42,"tag":91,"props":3707,"children":3709},{"href":3708},"/js/eslint/#how-to-integrate-eslint-with-vs-code",[3710],{"type":53,"value":3711},"ESLint",{"type":53,"value":2956},{"type":42,"tag":91,"props":3714,"children":3716},{"href":3715},"/php/phpcs/#how-to-use-php-code-sniffer-with-vs-code",[3717],{"type":53,"value":2946},{"type":53,"value":3719},", you can configure VS Code to display issues as you write code. Simply install ",{"type":42,"tag":91,"props":3721,"children":3724},{"href":3722,"rel":3723},"https://marketplace.visualstudio.com/items?itemName=swordev.phpstan",[2430],[3725],{"type":53,"value":3726},"the extension",{"type":53,"value":3728},". ",{"type":42,"tag":56,"props":3730,"children":3731},{},[3732],{"type":53,"value":3733},"This is useful because it allows you to spot bugs right after they are created.",{"type":42,"tag":3735,"props":3736,"children":3738},"prose-gallery",{":items":3737},"[\"https://cdn.pragmate.dev/wp-content/uploads/2025/02/c4ded9f3-b465-4490-b97d-99f0873f9509.png\",\"https://cdn.pragmate.dev/wp-content/uploads/2025/02/141da8c5-8411-44c3-9c22-fe2c5b68b088.png\"]",[],{"type":42,"tag":68,"props":3740,"children":3741},{},[],{"type":42,"tag":72,"props":3743,"children":3745},{"id":3744},"how-to-resolve-reported-errors",[3746],{"type":53,"value":3747},"How to Resolve Reported Errors?",{"type":42,"tag":49,"props":3749,"children":3750},{},[3751],{"type":53,"value":3752},"After configuring PHP Stan, two errors are left in the codebase. It’s already visible that the tool works great and is already helping us write more efficient code.",{"type":42,"tag":49,"props":3754,"children":3755},{},[3756],{"type":42,"tag":102,"props":3757,"children":3758},{"alt":104,"src":105},[],{"type":42,"tag":2923,"props":3760,"children":3761},{},[3762,3775],{"type":42,"tag":2927,"props":3763,"children":3764},{},[3765,3767,3773],{"type":53,"value":3766},"The first issue points out an unnecessary check for whether a value is empty. This is valid since the ",{"type":42,"tag":135,"props":3768,"children":3770},{"className":3769},[],[3771],{"type":53,"value":3772},"$instance",{"type":53,"value":3774}," has an object type so it’s never empty. It can be removed.",{"type":42,"tag":2927,"props":3776,"children":3777},{},[3778,3780,3786],{"type":53,"value":3779},"The second issue highlights that a ",{"type":42,"tag":135,"props":3781,"children":3783},{"className":3782},[],[3784],{"type":53,"value":3785},"Resolver",{"type":53,"value":3787}," class instance is being assigned to private class property but it’s never used again, so actually there’s no need to assign it to the class property. The class can be initialised itself.",{"type":42,"tag":49,"props":3789,"children":3790},{},[3791],{"type":42,"tag":102,"props":3792,"children":3794},{"alt":104,"src":3793},"https://cdn.pragmate.dev/wp-content/uploads/2025/02/a467038f-b286-410a-9793-4eeb527722f9.png",[],{"type":42,"tag":49,"props":3796,"children":3797},{},[3798,3800,3807,3809,3814,3816,3823],{"type":53,"value":3799},"The tool correctly analyzed the code, identified two issues, and contributed to ",{"type":42,"tag":91,"props":3801,"children":3804},{"href":3802,"rel":3803},"https://github.com/pragmatedev/vilare/commit/c420312a841e834f5e23b5d43b4a613ddf883a03",[2430],[3805],{"type":53,"value":3806},"reducing the size of the codebase",{"type":53,"value":3808},". And don’t let yourself think that removing a few lines is nothing to be proud of. Consider the bigger picture. ",{"type":42,"tag":56,"props":3810,"children":3811},{},[3812],{"type":53,"value":3813},"In real-world projects, achieving even a small reduction in the codebase size is a significant gain.",{"type":53,"value":3815}," Also, as ",{"type":42,"tag":91,"props":3817,"children":3820},{"href":3818,"rel":3819},"https://www.dailymail.co.uk/sport/football/article-14352289/Gabriel-laughs-Erling-Haalands-face-refuses-stay-humble-Arsenal-score-early-against-Man-City.html",[2430],[3821],{"type":53,"value":3822},"Erling Harland once said",{"type":53,"value":3824},", „stay humble”. PHP Stan won’t replace you as a tester. It only helps to find trivial bugs.",{"type":42,"tag":68,"props":3826,"children":3827},{},[],{"type":42,"tag":49,"props":3829,"children":3830},{},[3831,3833,3840],{"type":53,"value":3832},"If you enjoyed this article, please give it a thumbs up and ",{"type":42,"tag":91,"props":3834,"children":3837},{"href":3835,"rel":3836},"https://www.youtube.com/@pragmatedev?sub_confirmation=1",[2430],[3838],{"type":53,"value":3839},"consider subscribing",{"type":53,"value":3841}," for more content like this! Don't forget to check out my social profiles for updates and behind-the-scenes content. I'd love to hear from you, so drop a comment below with your thoughts.",{"type":42,"tag":3843,"props":3844,"children":3845},"style",{},[3846],{"type":53,"value":3847},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":164,"depth":164,"links":3849},[3850,3851,3857,3858,3859,3860,3861,3862,3863,3864],{"id":74,"depth":164,"text":77},{"id":112,"depth":164,"text":115,"children":3852},[3853,3854,3855,3856],{"id":758,"depth":173,"text":761},{"id":1162,"depth":173,"text":1165},{"id":1575,"depth":173,"text":1578},{"id":1972,"depth":173,"text":1975},{"id":2417,"depth":164,"text":2420},{"id":2482,"depth":164,"text":2485},{"id":2780,"depth":164,"text":2783},{"id":2913,"depth":164,"text":2916},{"id":3074,"depth":164,"text":3077},{"id":3471,"depth":164,"text":3474},{"id":3690,"depth":164,"text":3693},{"id":3744,"depth":164,"text":3747},"markdown","content:php:phpstan.md","content","php/phpstan.md","php/phpstan","md",1781868549975]