{"id":28567,"date":"2018-05-09T09:54:03","date_gmt":"2018-05-09T07:54:03","guid":{"rendered":"https:\/\/mamchenkov.net\/wordpress\/?p=28567"},"modified":"2018-05-09T09:54:03","modified_gmt":"2018-05-09T07:54:03","slug":"phpmetrics-static-analysis-tool-for-php","status":"publish","type":"post","link":"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/09\/phpmetrics-static-analysis-tool-for-php\/","title":{"rendered":"PhpMetrics &#8211; static analysis tool for PHP"},"content":{"rendered":"<!-- google_ad_section_start -->\n<p><a href=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"28568\" data-permalink=\"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/09\/phpmetrics-static-analysis-tool-for-php\/phpmetrics\/\" data-orig-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics.png?fit=640%2C324&amp;ssl=1\" data-orig-size=\"640,324\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"phpmetrics\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics.png?fit=640%2C324&amp;ssl=1\" class=\"aligncenter size-medium wp-image-28568\" src=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics-500x253.png?resize=500%2C253&#038;ssl=1\" alt=\"\" width=\"500\" height=\"253\" srcset=\"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics.png?resize=500%2C253&amp;ssl=1 500w, https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/phpmetrics.png?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www.phpmetrics.org\/\">PhpMetrics<\/a> is yet another tool in the ever growing list of the static code analyzers for PHP.\u00a0 Compared to the rest, I think this one is the easiest to install and run.\u00a0 And it produces the most eye candy reports ever.\u00a0 The generated report is in the HTML format, with fancy charts and graphs, and makes it really easy to spot and fix the issues.<\/p>\n<!-- google_ad_section_end -->\n","protected":false},"excerpt":{"rendered":"<!-- google_ad_section_start -->\n<p>PhpMetrics is yet another tool in the ever growing list of the static code analyzers for PHP.\u00a0 Compared to the rest, I think this one is the easiest to install and run.\u00a0 And it produces the most eye candy reports ever.\u00a0 The generated report is in the HTML format, with fancy charts and graphs, and &hellip; <a href=\"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/09\/phpmetrics-static-analysis-tool-for-php\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">PhpMetrics &#8211; static analysis tool for PHP<\/span><\/a><\/p>\n<!-- google_ad_section_end -->\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"PhpMetrics - static analysis tool for PHP #WebDev #PHP #QA #BestPractices","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_links_to":"","_links_to_target":""},"categories":[1,18,62,1334],"tags":[3069,38,3074,1330],"keyring_services":[],"class_list":["post-28567","post","type-post","status-publish","format-standard","hentry","category-general","category-programming","category-technology","category-web-work","tag-best-practices","tag-php","tag-quality-assurance","tag-web-development"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":27245,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/01\/16\/phpmetrics-a-static-analysis-tool-for-php\/","url_meta":{"origin":28567,"position":0},"title":"PhpMetrics &#8211; a static analysis tool for PHP","author":"Leonid Mamchenkov","date":"January 16, 2017","format":false,"excerpt":"PHPMetrics is yet another tool for static analysis of your PHP codebase. \u00a0It aims to provide a simpler and easier to understand report, than all those other tools in the PHP ecosystem today.","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2017\/01\/animated-demo-annoted-500x329.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":28452,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/03\/26\/kitab-documentation-rendering-and-testing-tool-for-php\/","url_meta":{"origin":28567,"position":1},"title":"Kitab &#8211; documentation rendering and testing tool for PHP","author":"Leonid Mamchenkov","date":"March 26, 2018","format":false,"excerpt":"Kitab is a handy tool for PHP developers that helps with two things: Render static HTML (with added search) from the doc-blocks in source code. Unit test the examples that are in the doc-blocks. There are a number of tools that do the first one (phpDocumentor, Doxygen, Sami, etc).\u00a0 However\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":27105,"url":"https:\/\/mamchenkov.net\/wordpress\/2016\/12\/11\/php-static-analysis-tool-discover-bugs-in-your-code-without-running-it\/","url_meta":{"origin":28567,"position":2},"title":"PHP Static Analysis Tool &#8211; discover bugs in your code without running it!","author":"Leonid Mamchenkov","date":"December 11, 2016","format":false,"excerpt":"Ond\u0159ej Mirtes shares the idea behind the creation of\u00a0PHPStan - a static analysis tool for PHP: Compiled languages need to know about the type of every variable, return type of every method etc. before the program runs. This is why the compiler needs to make sure that the program is\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28559,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/05\/08\/composer-plugin-qa-composer-plugin-for-php-quality-assurance-tools\/","url_meta":{"origin":28567,"position":3},"title":"composer-plugin-qa &#8211; Composer Plugin for PHP Quality Assurance Tools","author":"Leonid Mamchenkov","date":"May 8, 2018","format":false,"excerpt":"composer-plugin-qa is a Composer plugin which adds all the most popular PHP quality assurance tools as composer scripts, so that you don't have to install and set them up one by one.\u00a0 The list of tools includes the following: PHPUnit: Testing Framework PHPCOV: CLI frontend for the\u00a0PHP_CodeCoverage Paratest: Parallel testing\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mamchenkov.net\/wordpress\/wp-content\/uploads\/2018\/05\/composer-plugin-qa-500x296.jpeg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":28519,"url":"https:\/\/mamchenkov.net\/wordpress\/2018\/04\/25\/php-static-analysis\/","url_meta":{"origin":28567,"position":4},"title":"PHP Static Analysis","author":"Leonid Mamchenkov","date":"April 25, 2018","format":false,"excerpt":"Here are a couple of new tools in addition to previously mentioned PHPStan: Psalm by Vimeo.\u00a0 The cool thing about this static analyzer is that it supports both PHP 5.6 and PHP 7, unlike PHPStan which requires PHP 7.\u00a0 (Yeah, I know PHP 5.6 has reached the\u00a0end of its active\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":28276,"url":"https:\/\/mamchenkov.net\/wordpress\/2017\/12\/11\/php-fpm-tuning-using-pm-static-for-max-performance\/","url_meta":{"origin":28567,"position":5},"title":"PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance","author":"Leonid Mamchenkov","date":"December 11, 2017","format":false,"excerpt":"\"PHP-FPM tuning: Using \u2018pm static\u2019 for Max Performance\" looks at different process management settings in PHP-FPM: static, dynamic, and ondemand, and the way they affect performance.\u00a0 The default - ondemand - might work well for you if you have a large server with plenty of resources and not so many\u2026","rel":"","context":"In &quot;All&quot;","block_context":{"text":"All","link":"https:\/\/mamchenkov.net\/wordpress\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/comments?post=28567"}],"version-history":[{"count":0,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/posts\/28567\/revisions"}],"wp:attachment":[{"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/media?parent=28567"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/categories?post=28567"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/tags?post=28567"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/mamchenkov.net\/wordpress\/wp-json\/wp\/v2\/keyring_services?post=28567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}