{"id":31025817,"url":"https://github.com/ju1ius/luigi","last_synced_at":"2025-09-13T17:16:49.387Z","repository":{"id":65709459,"uuid":"597875712","full_name":"ju1ius/luigi","owner":"ju1ius","description":"Need to generate PHP code? Luigi does the plumbing!","archived":false,"fork":false,"pushed_at":"2023-02-05T23:53:35.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-24T16:34:57.580Z","etag":null,"topics":["code-builder","code-generation","codegen","compiler-tool"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ju1ius.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":"2023-02-05T22:06:44.000Z","updated_at":"2023-02-06T01:24:49.000Z","dependencies_parsed_at":"2023-02-19T02:30:54.583Z","dependency_job_id":null,"html_url":"https://github.com/ju1ius/luigi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ju1ius/luigi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ju1ius%2Fluigi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ju1ius%2Fluigi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ju1ius%2Fluigi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ju1ius%2Fluigi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ju1ius","download_url":"https://codeload.github.com/ju1ius/luigi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ju1ius%2Fluigi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274997547,"owners_count":25387934,"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","status":"online","status_checked_at":"2025-09-13T02:00:10.085Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["code-builder","code-generation","codegen","compiler-tool"],"created_at":"2025-09-13T17:16:46.657Z","updated_at":"2025-09-13T17:16:49.367Z","avatar_url":"https://github.com/ju1ius.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ju1ius/luigi\n\n[![codecov](https://codecov.io/gh/ju1ius/luigi/branch/main/graph/badge.svg?token=0GN2JPV0DW)](https://codecov.io/gh/ju1ius/luigi)\n\nNeed to generate PHP code? Luigi does the plumbing!\n\n## Installation\n\n```sh\ncomposer require ju1ius/luigi\n```\n\n## Basic usage\n\n```php\nuse ju1ius\\Luigi\\CodeBuilder;\n\n$code = CodeBuilder::create();\n// The `raw` method adds verbatim code\n$code-\u003eraw(\"return [\\n\");\n// The `indent` method increases the indent level\n$code-\u003eindent();\n// The `write` does the same as `raw` but respects the indent level\n$code-\u003ewrite(\"42,\\n\");\n// The `writeln` method does the same as `write`, but adds a newline character after each argument.\n$code-\u003ewriteln('33,', '66,');\n// The `dedent` method decreases the indent level\n$code-\u003ededent();\n$code-\u003ewriteln('];');\n// CodeBuilder implements the `Stringable` interface\necho $code;\n```\n\nThis is the expected output:\n```php\nreturn [\n    42,\n    33,\n    66,\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fju1ius%2Fluigi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fju1ius%2Fluigi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fju1ius%2Fluigi/lists"}