{"id":19446310,"url":"https://github.com/devskiller/devskiller-sample-php-calculator","last_synced_at":"2025-10-27T15:42:56.154Z","repository":{"id":79327840,"uuid":"49941125","full_name":"Devskiller/devskiller-sample-php-calculator","owner":"Devskiller","description":"Devskiller sample programming task for PHP with Phing","archived":false,"fork":false,"pushed_at":"2022-01-25T11:51:34.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T03:01:53.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Devskiller.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-01-19T09:21:44.000Z","updated_at":"2024-03-30T12:57:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8d3ca9a-f9dd-4eba-ae1c-0a4b86e1da1c","html_url":"https://github.com/Devskiller/devskiller-sample-php-calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Devskiller/devskiller-sample-php-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fdevskiller-sample-php-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fdevskiller-sample-php-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fdevskiller-sample-php-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fdevskiller-sample-php-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devskiller","download_url":"https://codeload.github.com/Devskiller/devskiller-sample-php-calculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devskiller%2Fdevskiller-sample-php-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274851551,"owners_count":25361607,"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-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-11-10T16:13:31.084Z","updated_at":"2025-10-27T15:42:56.062Z","avatar_url":"https://github.com/Devskiller.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Devskiller programming task sample - PHP with Phing\n\n## Introduction\n\nWith [Devskiller.com](https://devskiller.com) you can assess your candidates'\nprogramming skills as a part of your recruitment process. We have found that\nprogramming tasks are the best way to do this and have built our tests\naccordingly. The way our test works is your candidate is asked to modify the\nsource code of an existing project.\n\nDuring the test, your candidates have the option of using our browser-based\ncode editor and can build the project inside the browser at any time. If they\nwould prefer to use an IDE they are more comfortable with, they can also\ndownload the project code or clone the project’s Git repository and work\nlocally.\n\nYou can check out this short video to see the test from the [candidate's\nperspective](https://devskiller.zendesk.com/hc/en-us/articles/360019534639-How-the-TalentScore-test-looks-like-from-the-candidate-perspective).\n\nThis repo contains a sample project for PHP with Phing and below you can\nfind a detailed guide for creating your own programming project.\n\n**Please make sure to read our [Getting started with programming\nprojects](https://devskiller.zendesk.com/hc/en-us/articles/360019531059-Getting-started-with-Programming-Tasks) guide first**\n\n## Technical details\n\nAny **Phing** project may be used as a programming task. We use **PHPUnit** for\nunit tests and **composer** for external dependencies.\n\nWe support following project structure for Phing projects. Please, be sure to\nput your `build.xml` inside `build/` directory.\n\n```\nPROJECT_ROOT/\n    app/                # PHP Source code\n        ...\n    build/\n        build.xml       # Phing project descriptor\n    tests/              # Unit tests\n        ...\n    composer.json       # Composer dependencies descriptor\n    phpunit.xml         # PHPUnit configuration\n```\n\nPhing build will be executed with the following command:\n\n```sh\nphing -f build/build.xml\n```\n\nWhen configuring your project ensure that the junit test logger is enabled in\n`phpunit.xml`:\n\n```xml\n    \u003clogging\u003e\n        \u003clog type=\"junit\" target=\"build/logs/TEST-junit.xml\" logIncompleteSkipped=\"false\" title=\"Test Results\"/\u003e\n    \u003c/logging\u003e\n```\n\n## Automatic assessment\n\nIt is possible to automatically assess the solution posted by the candidate.\nAutomatic assessment is based on unit tests results and code quality\nmeasurements.\n\nThere are two kinds of unit tests:\n\n1. **Candidate tests** - unit tests that the candidate can see during the test\n   should be used only for basic verification and to guide the candidate in\n   understanding the requirements of the project. Candidate tests WILL NOT be used\n   to calculate the final score.\n2. **Verification tests** - unit tests that the candidate can’t see during the\n   test. Files containing verification tests will be added to the project after\n   the candidate finishes the test and will be executed during the verification\n   phase. The results of the verification tests will be used to calculate the\n   final score.\n\nOnce the solution is developed and submitted, the platform executes\nverification tests and performs static code analysis.\n\n## Devskiller project descriptor\n\nProgramming tasks can be configured with the Devskiller project descriptor file:\n\n1. Create a `devskiller.json` file.\n2. Place it in the root directory of your project.\n\nHere is an example project descriptor:\n\n```json\n{\n  \"readOnlyFiles\" : [\"phpunit.xml\", \"build/build.xml\"],\n  \"verification\" : {\n    \"testNamePatterns\" : [\".*verify_pack.*\"],\n    \"pathPatterns\" : [\"**tests/verify_pack**\"]\n  }\n}\n```\n\nYou can find more details about the `devskiller.json` descriptor in our\n[documentation](https://devskiller.zendesk.com/hc/en-us/articles/360019530419-Programming-task-project-descriptor).\n\n## Automatic verification with verification tests\n\nThe solution submitted by the candidate may be verified using automated tests.\nYou’ll just have to define which tests should be treated as verification tests.\n\nAll files classified as verification tests will be removed from the project\nprior to inviting the candidate.\n\nTo define verification tests, you need to set two configuration properties in\n`devskiller.json`:\n\n- `testNamePatterns` - an array of RegEx patterns which should match all the\n  names of the verification tests.\n- `pathPatterns` - an array of GLOB patterns which should match all the files\n  containing verification tests. All the files that match defined patterns will\n  be deleted from candidates' projects and will be added to the projects during\n  the verification phase. These files will not be visible to the candidate during\n  the test.\n\nIn our sample task all verifications tests are in `verify_pack` namespace. In this case\nthe following patterns will be sufficient:\n\n```json\n\"testNamePatterns\" : [\".*verify_pack.*\"],\n\"pathPatterns\" : [\"**tests/verify_pack**\"]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevskiller%2Fdevskiller-sample-php-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevskiller%2Fdevskiller-sample-php-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevskiller%2Fdevskiller-sample-php-calculator/lists"}