{"id":21258581,"url":"https://github.com/ubc/ctlt-php-coding-standard","last_synced_at":"2026-03-19T19:30:43.339Z","repository":{"id":2562010,"uuid":"3541244","full_name":"ubc/CTLT-PHP-coding-standard","owner":"ubc","description":"UBC CTLT PHP coding standard ","archived":false,"fork":false,"pushed_at":"2014-07-29T00:38:20.000Z","size":152,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-01-21T21:44:55.258Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-02-25T00:35:35.000Z","updated_at":"2014-01-20T16:06:43.000Z","dependencies_parsed_at":"2022-09-13T04:32:43.325Z","dependency_job_id":null,"html_url":"https://github.com/ubc/CTLT-PHP-coding-standard","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2FCTLT-PHP-coding-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2FCTLT-PHP-coding-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2FCTLT-PHP-coding-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2FCTLT-PHP-coding-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/CTLT-PHP-coding-standard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243695454,"owners_count":20332622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T04:09:43.981Z","updated_at":"2026-01-01T23:44:29.112Z","avatar_url":"https://github.com/ubc.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"CTLT PHP CodeSniffer Coding Standard\n========================================\n\nA code standard based on [Symfony 2 coding standards](http://symfony.com/doc/current/contributing/code/standards.html).\n\nInstallation (Composer)\n-----------------------\n\n1. [Install composer](https://getcomposer.org/download/)\n2. Add the dependency to composer.json:\n\n    ```json\n    {\n        \"require-dev\": {\n            \"ubc/ctlt-coding-standard\": \"~1.0\",\n        }\n    }\n    ```\n3. Install dependencies\n\n    composer update\n\n4. Use it\n\n    phpcs --standard=vendor/ubc/ctlt-coding-standard/ruleset.xml --runtime-set installed_paths vendor/m6web/symfony2-coding-standard src/*\n\nOr add the following Phing task:\n\n    \u003ctarget name=\"phpcs\"\n        description=\"Find coding standard violations using PHP_CodeSniffer and print human readable output. Intended for usage on the command line before committing.\"\u003e\n        \u003cphpcodesniffer standard=\"${vendordir}/ubc/ctlt-coding-standard/ruleset.xml\"\u003e\n            \u003cconfig name=\"installed_paths\" value=\"${vendordir}/m6web/symfony2-coding-standard\"/\u003e\n            \u003cfileset dir=\"${sourcedir}\"\u003e\n                \u003cinclude name=\"**/*.php\" /\u003e\n            \u003c/fileset\u003e\n        \u003c/phpcodesniffer\u003e\n    \u003c/target\u003e\n\nInstallation (Pear)\n-------------------\n\n1. Install phpcs:\n\n        pear install PHP_CodeSniffer\n\n2. Find your PEAR directory:\n\n        pear config-show | grep php_dir\n\n3. Copy, symlink or check out this repo and Symfony2 coding standard to the\n   phpcs `Standards` directory:\n\n        cd /path/to/pear/PHP/CodeSniffer/Standards\n        git clone git://github.com/opensky/Symfony2-coding-standard.git Symfony2\n        git clone git://github.com/ubc/CTLT-PHP-coding-standard.git CTLT\n\n4. Set CTLT as your default coding standard:\n\n        phpcs --config-set default_standard CTLT\n\n5. ...\n\n6. Profit!\n\n        cd /path/to/my/project\n        phpcs\n        phpcs path/to/my/file.php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fctlt-php-coding-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fctlt-php-coding-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fctlt-php-coding-standard/lists"}