{"id":3666,"date":"2020-12-23T04:52:31","date_gmt":"2020-12-23T04:52:31","guid":{"rendered":"https:\/\/studysection.com\/blog\/?p=3666"},"modified":"2020-12-23T05:47:17","modified_gmt":"2020-12-23T05:47:17","slug":"coding-standards-in-cakephp","status":"publish","type":"post","link":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/","title":{"rendered":"Coding Standards in Cakephp"},"content":{"rendered":"<p>CakePHP Developers will use the PSR-2 Coding Standards guide in addition to the following rules as coding standards. You can use the CakePHP Code Sniffer to check that your coding follows the required standards.<\/p>\n<h2>IDE Setup<\/h2>\n<p>Please make sure your IDE is set up to \u201ctrim right\u201d on whitespaces. There should be no trailing spaces per line.<\/p>\n<h3>Indentation<\/h3>\n<p>Four spaces should be used for indentation.<br \/>\nExample:<br \/>\n<code>\/\/ base level<br \/>\n    \/\/ level 1<br \/>\n        \/\/ level 2<br \/>\n    \/\/ level 1<br \/>\n\/\/ base level<\/code><\/p>\n<p>If you are using the multiline function call then follow the following guidelines.<\/p>\n<ol>\n<li>Opening the parenthesis of a multi-line function call must be the last content on the line.<\/li>\n<li>Only one argument is allowed per line in a multi-line function call.<\/li>\n<li>Closing parenthesis of a multi-line function call must be on a line by itself Instead of using the following formatting:<br \/>\n<code>$matches = array_intersect_key($this->_listeners,<br \/>\n                array_flip(preg_grep($matchPattern,<br \/>\n                    array_keys($this->_listeners), 0)));<br \/>\nUse this instead:<br \/>\n$matches = array_intersect_key(<br \/>\n    $this->_listeners,<br \/>\n    array_flip(<br \/>\n        preg_grep($matchPattern, array_keys($this->_listeners), 0)<br \/>\n    )<br \/>\n);<\/code><\/li>\n<\/ol>\n<p><strong>Line Length<\/strong><br \/>\nIt is recommended to keep lines at approximately 100 characters long for better coding readability. Lines must not be longer than 120 characters.<\/p>\n<h3>Control Structures<\/h3>\n<ol>\n<li>In the control structures, there should be 1 (one) space before the first parenthesis and 1 (one) space between the last parenthesis and the opening bracket.<\/li>\n<li>Always use curly brackets in control structures, even if they are not needed. They increase the readability of the code, and they give you fewer logical errors.<\/li>\n<li>Opening curly brackets should be placed on the same line as the control structure. Closing curly brackets should be placed on new lines, and they should have the same indentation level as the control structure. The statement included in curly brackets should begin on a new line, and coding contained within it should gain a new level of indentation.<\/li>\n<li>Inline assignments should not be used inside of the control structures. Below is an example of <strong>\u2018if\u2019<\/strong>:<br \/>\n<code>if ((expr_1) || (expr_2)) {<br \/>\n    \/\/ action_1;<br \/>\n} elseif (!(expr_3) && (expr_4)) {<br \/>\n    \/\/ action_2;<br \/>\n} else {<br \/>\n    \/\/ default_action;<br \/>\n}<\/p>\n<ol>\n<li>if (expr) statement; ( wrong = no brackets, badly placed )<\/li>\n<li>if (expr)                   ( wrong = no brackets )<br \/>\n    \t    statement;<\/li>\n<li>if (expr) {                  ( good )<br \/>\n    statement;<br \/>\n}<\/li>\n<li>if ($variable = Class::function()) {  ( wrong = inline assignment )<br \/>\n    statement;<br \/>\n}<\/li>\n<li>$variable = Class::function(); ( good )<br \/>\nif ($variable) {<br \/>\n    statement;<br \/>\n}<\/li>\n<\/ol>\n<p><\/code>\n<\/li>\n<\/ol>\n<h3>Ternary operator<\/h3>\n<p>Ternary operators are permissible when the entire ternary operation fits on one line. Longer ternaries should be split into if-else statements. Ternary operators should not ever be nested. Optionally parentheses can be used around the condition check of the ternary for clarity:<br \/>\n<code>\/\/ Good, simple and readable<br \/>\n$variable = isset($options['variable']) ? $options['variable'] : true;<br \/>\n\/\/ Nested ternaries are bad<br \/>\n$variable = isset($options['variable']) ? isset($options['othervar']) ? true : false : false;<\/code><\/p>\n<h3>Template Files<\/h3>\n<p>In template files (.ctp files) developers should use keyword control structures. Keyword control structures are easier to read in complex template files. Control structures can either be contained in a larger PHP block, or in separate PHP tags:<br \/>\n<code>&lt;?php<br \/>\nif ($isAdmin):<br \/>\n    echo '&lt;p>You are the admin user.&lt;\/p>';<br \/>\nendif;<br \/>\n?><br \/>\n&lt;p>The following is also acceptable:&lt;\/p><br \/>\n&lt;?php if ($isAdmin): ?><br \/>\n    &lt;p>You are the admin user.&lt;\/p><br \/>\n&lt;?php endif; ?><br \/>\n<\/code><\/p>\n<h3>Comparison<\/h3>\n<p>Always try to be as Strict as possible:<br \/>\nFor testing if a variable is null, it is recommended to use a strict check:<br \/>\n<code>if ($value === null) {<br \/>\n    \/\/ ...<br \/>\n}<br \/>\nThe value to check against should be placed on the right side:<br \/>\n\/\/ not recommended<br \/>\nif (null === $this->foo()) {<br \/>\n    \/\/ ...<br \/>\n}<br \/>\n\/\/ recommended<br \/>\nif ($this->foo() === null) {<br \/>\n    \/\/ ...<br \/>\n}<\/code><\/p>\n<h3>Function Calls<\/h3>\n<p>Functions should be called without space between the function\u2019s name and starting parenthesis. There should be one space between every parameter of a function call:<br \/>\n<code>$var = foo($bar, $bar2, $bar3);<br \/>\nMethod Definitions<br \/>\npublic function someFunction($arg1, $arg2 = '')<br \/>\n{<br \/>\n    if (expr) {<br \/>\n        statement;<br \/>\n    }<br \/>\n    return $var;<br \/>\n}<\/code><br \/>\nParameters with a default value should be placed last in the function definition. Try to make your functions return something, at least true or false, so it can be determined whether the function call was successful:<\/p>\n<h3>Bail Early<\/h3>\n<p>Try to avoid unnecessary nesting by bailing early:<br \/>\n<code>public function run(array $data)<br \/>\n{<br \/>\n    ...<br \/>\n    if (!$success) {<br \/>\n        return false;<br \/>\n    }<br \/>\n    ...<br \/>\n}<\/code><\/p>\n<h3>Type Hinting<\/h3>\n<p>Arguments that expect objects, arrays, or callbacks (callable) can be type hinted. We only type-hint public methods, though, as type hinting is not cost-free:<br \/>\n<code>public function foo(Table $table, array $array, callable $callback, $boolean){}<\/code><br \/>\nHere $table must be an instance of \\Cake\\ORM\\Table, $array must be an array and $callback must be of type callable (a valid callback).<\/p>\n<h3>Method Chaining<\/h3>\n<p>Method chaining should have multiple methods spread across separate lines, and indented with four spaces:<br \/>\n<code>$email->from('foo@example.com')<br \/>\n    ->to('bar@example.com')<br \/>\n    ->subject('A great message')<br \/>\n    ->send();<br \/>\nIncluding Files<br \/>\ninclude, require, include_once, and require_once do not have parentheses:<br \/>\n\/\/ wrong = parentheses<br \/>\nrequire_once('ClassFileName.php');<br \/>\nrequire_once ($class);<br \/>\n\/\/ good = no parentheses<br \/>\nrequire_once 'ClassFileName.php';<br \/>\nrequire_once $class;<\/code><\/p>\n<p>When including files with classes or libraries, use only and always the require_once function.<\/p>\n<h3>PHP Tags<\/h3>\n<p>Always use long tags (<strong>&lt;?php ?><\/strong>) instead of short tags (<strong>&lt;? ?><\/strong>). The short echo should be used in template files (.ctp) where appropriate.<\/p>\n<h3>Short Echo<\/h3>\n<p>The short echo should be used in template files in place of <?php echo. It should be immediately followed by a single space, the variable or function value to echo, a single space, and the PHP closing tag:\n<code>\/\/ wrong = semicolon, no spaces<br \/>\n&lt;td>&lt;?=$name;?>&lt;\/td><br \/>\n\/\/ good = spaces, no semicolon<br \/>\n&lt;td>&lt;?= $name ?>&lt;\/td><\/code><\/p>\n<h3>Naming Conventions<\/h3>\n<p><strong>Functions:<\/strong><br \/>\nWrite all functions in the camelBack case.<br \/>\n<code>function longFunctionName()<br \/>\n{<br \/>\n}<\/code><\/p>\n<h3>Classes:<\/h3>\n<p>Class names should be written in CamelCase, for example:<br \/>\n<code>class ExampleClass<br \/>\n{<br \/>\n}<\/code><\/p>\n<h3>Variables:<\/h3>\n<p>Variable names should be as descriptive as possible, but also as short as possible. All variables should start with a lowercase letter and should be written in camelBack in case of multiple words. Variables referencing objects should in some way associate to the class a variable is an object of. Example:<br \/>\n<code>$user = 'John';<br \/>\n$users = ['John', 'Hans', 'Arne'];<br \/>\n$dispatcher = new Dispatcher();<\/code><\/p>\n<h3>Member Visibility<\/h3>\n<p>Use PHP\u2019s public, protected, and private keywords for methods and variables.<br \/>\n<strong>Files<\/strong><br \/>\nFile names which do not contain classes should be lowercase and underscore, for example:<br \/>\n<strong>long_file_name.php<\/strong><\/p>\n<p><strong>Type Casting<\/strong><br \/>\nPlease use (int)$var instead of intval($var) and (float)$var instead of floatval($var) when applicable in Type Casting.<\/p>\n<p><strong>Constants<\/strong><br \/>\nConstants should be defined in capital letters:<br \/>\n<code>define('CONSTANT', 1);<br \/>\nCareful when using the empty() \/ isset()<\/code><\/p>\n<p>While empty() is easy to use the function, it can mask errors and cause unintended effects when &#8216;0&#8217; and 0 are given. When variables or properties are already defined, the usage of empty() is not recommended. When working with variables, it is better to rely on type-coercion to boolean instead of empty():<br \/>\n<code>function manipulate($var)<br \/>\n{<br \/>\n    \/\/ Not recommended, $var is already defined in the scope<br \/>\n    if (empty($var)) {<br \/>\n        \/\/ ...<br \/>\n    }<br \/>\n    \/\/ Use boolean type coercion<br \/>\n    if (!$var) {<br \/>\n        \/\/ ...<br \/>\n    }<br \/>\n    if ($var) {<br \/>\n        \/\/ ...<br \/>\n    }<br \/>\n}<\/code><\/p>\n<p>When dealing with defined properties you should favor null checks over empty()\/isset() checks:<br \/>\n<code>class Thing<br \/>\n{<br \/>\n    private $property; \/\/ Defined<br \/>\n    public function readProperty()<br \/>\n    {<br \/>\n        \/\/ Not recommended as the property is defined in the class<br \/>\n        if (!isset($this->property)) {<br \/>\n            \/\/ ...<br \/>\n        }<br \/>\n        \/\/ Recommended<br \/>\n        if ($this->property === null) {<br \/>\n        }<br \/>\n    }<br \/>\n}<\/code><\/p>\n<p>When working with arrays, it is better to merge in defaults instead of using empty() checks. By merging in defaults, you can ensure that the required keys are defined:<br \/>\n<code>function doWork(array $array)<br \/>\n{<br \/>\n    \/\/ Merge defaults to remove the need for empty checks.<br \/>\n    $array += [<br \/>\n        'key' => null,<br \/>\n    ];<br \/>\n    \/\/ Not recommended, the key is already set<br \/>\n    if (isset($array['key'])) {<br \/>\n        \/\/ ...<br \/>\n    }<br \/>\n    \/\/ Recommended<br \/>\n    if ($array['key'] !== null) {<br \/>\n        \/\/ ...<br \/>\n    }<br \/>\n}<\/code><\/p>\n<p><small><em>jQuery presents a tree-like structure of all the elements on a webpage simplifying the syntax and further manipulating such elements. The <a href=\"https:\/\/www.studysection.com\/jquery-advanced\">jQuery Certification Exam<\/a> by StudySection will secure your fundamental knowledge and a basic understanding of jQuery as an asset to improve your skills.<\/em><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>CakePHP Developers will use the PSR-2 Coding Standards guide in addition to the following rules as coding standards. You can<\/p>\n","protected":false},"author":1,"featured_media":3667,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[591,498],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>StudySection Blog - Coding Standards in Cakephp<\/title>\n<meta name=\"description\" content=\"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"StudySection Blog - Coding Standards in Cakephp\" \/>\n<meta property=\"og:description\" content=\"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog Posts on famous people, innovations and educational topics\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/studysection\" \/>\n<meta property=\"article:published_time\" content=\"2020-12-23T04:52:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-12-23T05:47:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/12\/cakephp.png\" \/>\n\t<meta property=\"og:image:width\" content=\"300\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin-studysection-blog\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@studysection\" \/>\n<meta name=\"twitter:site\" content=\"@studysection\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin-studysection-blog\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\"},\"author\":{\"name\":\"admin-studysection-blog\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\"},\"headline\":\"Coding Standards in Cakephp\",\"datePublished\":\"2020-12-23T04:52:31+00:00\",\"dateModified\":\"2020-12-23T05:47:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\"},\"wordCount\":587,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"keywords\":[\"Cakephp\",\"Coding\"],\"articleSection\":[\"Learn and Grow\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\",\"url\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\",\"name\":\"StudySection Blog - Coding Standards in Cakephp\",\"isPartOf\":{\"@id\":\"https:\/\/studysection.com\/blog\/#website\"},\"datePublished\":\"2020-12-23T04:52:31+00:00\",\"dateModified\":\"2020-12-23T05:47:17+00:00\",\"description\":\"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.\",\"breadcrumb\":{\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/studysection.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Coding Standards in Cakephp\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/studysection.com\/blog\/#website\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"name\":\"Blog Posts on famous people, innovations and educational topics\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/studysection.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/studysection.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/studysection.com\/blog\/#organization\",\"name\":\"StudySection\",\"url\":\"https:\/\/studysection.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"contentUrl\":\"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png\",\"width\":920,\"height\":440,\"caption\":\"StudySection\"},\"image\":{\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/studysection\",\"https:\/\/twitter.com\/studysection\",\"https:\/\/www.instagram.com\/study.section\/\",\"https:\/\/www.linkedin.com\/company\/studysection\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402\",\"name\":\"admin-studysection-blog\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g\",\"caption\":\"admin-studysection-blog\"},\"url\":\"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"StudySection Blog - Coding Standards in Cakephp","description":"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/","og_locale":"en_US","og_type":"article","og_title":"StudySection Blog - Coding Standards in Cakephp","og_description":"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.","og_url":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/","og_site_name":"Blog Posts on famous people, innovations and educational topics","article_publisher":"https:\/\/www.facebook.com\/studysection","article_published_time":"2020-12-23T04:52:31+00:00","article_modified_time":"2020-12-23T05:47:17+00:00","og_image":[{"width":300,"height":200,"url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2020\/12\/cakephp.png","type":"image\/png"}],"author":"admin-studysection-blog","twitter_card":"summary_large_image","twitter_creator":"@studysection","twitter_site":"@studysection","twitter_misc":{"Written by":"admin-studysection-blog","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#article","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/"},"author":{"name":"admin-studysection-blog","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402"},"headline":"Coding Standards in Cakephp","datePublished":"2020-12-23T04:52:31+00:00","dateModified":"2020-12-23T05:47:17+00:00","mainEntityOfPage":{"@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/"},"wordCount":587,"commentCount":0,"publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"keywords":["Cakephp","Coding"],"articleSection":["Learn and Grow"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/","url":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/","name":"StudySection Blog - Coding Standards in Cakephp","isPartOf":{"@id":"https:\/\/studysection.com\/blog\/#website"},"datePublished":"2020-12-23T04:52:31+00:00","dateModified":"2020-12-23T05:47:17+00:00","description":"CakePHP Developers uses PSR-2 Coding Standards guide while following rules as coding standards. CakePHP Code Sniff checks required standards.","breadcrumb":{"@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/studysection.com\/blog\/coding-standards-in-cakephp\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/studysection.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Coding Standards in Cakephp"}]},{"@type":"WebSite","@id":"https:\/\/studysection.com\/blog\/#website","url":"https:\/\/studysection.com\/blog\/","name":"Blog Posts on famous people, innovations and educational topics","description":"","publisher":{"@id":"https:\/\/studysection.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/studysection.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/studysection.com\/blog\/#organization","name":"StudySection","url":"https:\/\/studysection.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","contentUrl":"https:\/\/studysection.com\/blog\/wp-content\/uploads\/2021\/10\/studySection-logo.png","width":920,"height":440,"caption":"StudySection"},"image":{"@id":"https:\/\/studysection.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/studysection","https:\/\/twitter.com\/studysection","https:\/\/www.instagram.com\/study.section\/","https:\/\/www.linkedin.com\/company\/studysection"]},{"@type":"Person","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/db367e2c29a12d1808fb1979edb3d402","name":"admin-studysection-blog","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/studysection.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/054ac87a6874df1932004239cd8eab36?s=96&d=mm&r=g","caption":"admin-studysection-blog"},"url":"https:\/\/studysection.com\/blog\/author\/admin-studysection-blog\/"}]}},"views":354,"_links":{"self":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/3666"}],"collection":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/comments?post=3666"}],"version-history":[{"count":6,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/3666\/revisions"}],"predecessor-version":[{"id":3672,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/posts\/3666\/revisions\/3672"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media\/3667"}],"wp:attachment":[{"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/media?parent=3666"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/categories?post=3666"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/studysection.com\/blog\/wp-json\/wp\/v2\/tags?post=3666"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}