{"id":19826878,"url":"https://github.com/dedalozzo/lint","last_synced_at":"2025-07-05T03:36:07.975Z","repository":{"id":5008009,"uuid":"6166378","full_name":"dedalozzo/lint","owner":"dedalozzo","description":"Lint is a wrapper to 'PHP -l' command.","archived":false,"fork":false,"pushed_at":"2017-11-29T15:22:18.000Z","size":60,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-24T23:44:07.709Z","etag":null,"topics":["cli","lint","linter","php","wrapper"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dedalozzo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-11T00:11:10.000Z","updated_at":"2023-10-07T15:45:17.000Z","dependencies_parsed_at":"2022-09-21T21:42:55.081Z","dependency_job_id":null,"html_url":"https://github.com/dedalozzo/lint","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/dedalozzo/lint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Flint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Flint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Flint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Flint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dedalozzo","download_url":"https://codeload.github.com/dedalozzo/lint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dedalozzo%2Flint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262842978,"owners_count":23373173,"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":["cli","lint","linter","php","wrapper"],"created_at":"2024-11-12T11:11:53.044Z","updated_at":"2025-07-05T03:36:07.949Z","avatar_url":"https://github.com/dedalozzo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Latest Stable Version](https://poser.pugx.org/3f/lint/v/stable.png)](https://packagist.org/packages/3f/lint)\n[![Latest Unstable Version](https://poser.pugx.org/3f/lint/v/unstable.png)](https://packagist.org/packages/3f/lint)\n[![Build Status](https://scrutinizer-ci.com/g/dedalozzo/lint/badges/build.png?b=master)](https://scrutinizer-ci.com/g/dedalozzo/lint/build-status/master)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dedalozzo/lint/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dedalozzo/lint/?branch=master)\n[![License](https://poser.pugx.org/3f/lint/license.svg)](https://packagist.org/packages/3f/lint)\n[![Total Downloads](https://poser.pugx.org/3f/lint/downloads.png)](https://packagist.org/packages/3f/lint)\n\n\nLint\n====\nLint is a wrapper to `php -l` command.\n\n\nComposer Installation\n---------------------\n\nTo install Lint, you first need to install [Composer](http://getcomposer.org/), a Package Manager for\nPHP, following those few [steps](http://getcomposer.org/doc/00-intro.md#installation-nix):\n\n```sh\ncurl -s https://getcomposer.org/installer | php\n```\n\nYou can run this command to easily access composer from anywhere on your system:\n\n```sh\nsudo mv composer.phar /usr/local/bin/composer\n```\n\n\nLint Installation\n-----------------\nOnce you have installed Composer, it's easy install Lint.\n\n1. Edit your `composer.json` file, adding Lint to the require section:\n```sh\n{\n    \"require\": {\n        \"3f/lint\": \"dev-master\"\n    },\n}\n```\n2. Run the following command in your project root dir:\n```sh\ncomposer update\n```\n\n\nUsage\n-----\nLint provides two static methods only: `checkSourceFile()` and `checkSourceCode()`:\n\n```php\nLint::checkSourceFile(\"foo.php\");\n```\n\nMethods\n-------\n\n### Lint::checkSourceFile()\n\n```php\npublic static function checkSourceFile(\n    $fileName\n)\n```\n\nMakes the syntax check of the specified file. If an error occurs, generates an exception.\n\n**Parameters**\n\n* fileName\n\n  The file name you want check.\n\n**Exceptions**\n\n* RuntimeException\n\n  In case of error it raises an exception.\n\n### Lint::checkSourceCode()\n\n```php\npublic static function checkSourceCode(\n    $str,\n    $addTags = TRUE\n)\n```\n\nMakes the syntax check of the given source code. If an error occurs, generates an exception.\n\n**Parameters**\n\n* str\n\n  The source code.\n\n* addTags\n\n  Tells if you want add PHP tags to the source code, because PHP lint needs them or it will raise an exception.\n\n**Exceptions**\n\n* RuntimeException\n\n  In case of error it raises an exception.\n\n\nDocumentation\n-------------\nThe documentation can be generated using [Doxygen](http://doxygen.org). A `Doxyfile` is provided for your convenience.\n\n\nRequirements\n------------\n- PHP 5.4.0 or above.\n\n\nAuthors\n-------\nFilippo F. Fadda - \u003cfilippo.fadda@programmazione.it\u003e - \u003chttp://www.linkedin.com/in/filippofadda\u003e\n\n\nLicense\n-------\nLint is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalozzo%2Flint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdedalozzo%2Flint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdedalozzo%2Flint/lists"}