StyleCI - The PHP Coding Style Service

1 post in this topic

Hey all,

I've been away for a while, working on one thing or another... Recently it's been StyleCI, The PHP Coding Style Service.

StyleCI connects to your GitHub repositories and watches for commits or pull requests, with the ability of automatically fixing the code standards if it hasn't matched your settings.

The likes of Laravel and Graze are using StyleCI now, among many other projects. Yesterday we hit a massive milestone, we analysed the 100,000 commit!

I'd love to hear your feedback :)



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • mLipok
      By mLipok
      Recently I was working on TeamVierwer API .
      I had a little break, and wanted to check out another platform.
      Here is the result of my attempt:
      #include "GHAPI.au3" _GHAPI_AccessToken('b3e8.....de..........bdc3a0c.....bd27c6f') _GHAPI_GetUser("users/mLipok") _GHAPI_GetUserOrganizations("users/mLipok") _GHAPI_RootEndpoints() and GHAPI.au3
      #include-once #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7 #Tidy_Parameters=/sort_funcs /reel #Region GHAPI.au3 - Header ; #INDEX# ======================================================================================================================= ; Title .........: GHAPI UDF ; AutoIt Version : ; Language ......: English ; Description ...: This is an UDF for for communicate with https://api.github.com via GitHub RESTful API ; Author(s) .....: mLipok ; Modified ......: ; =============================================================================================================================== #cs Title: GHAPI UDF Filename: GHAPI.au3 Description: This is an UDF for for communicate with https://api.github.com via GitHub RESTful API Author: mLipok Modified: Last Update: 2017/05/23 Requirements: AutoIt or higher #ce #EndRegion GHAPI.au3 - Header #Region GHAPI.au3 - Include #include <array.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #EndRegion GHAPI.au3 - Include #Region GHAPI.au3 - Declarations Global $oErrorHandler = ObjEvent("AutoIt.Error", "_GHAPI_ErrFunc") Global $__g_sGitHubAPI_BaseUrl = "https://api.github.com" ; URL of the GitHub API Global $__g_sGitHubAPI_Version = "v3" ; Put the current API version in here Global Enum _ $GHAPI_ERR_SUCCESS, _ $GHAPI_ERR_GENERAL, _ $GHAPI_ERR_COMERROR, _ $GHAPI_ERR_STATUS, _ $GHAPI_ERR_COUNTER Global Enum _ $GHAPI_EXT_DEFAULT, _ $GHAPI_EXT_PARAM1, _ $GHAPI_EXT_PARAM2, _ $GHAPI_EXT_PARAM3, _ $GHAPI_EXT_COUNTER Global Enum _ $GHAPI_RET_SUCCESS, _ $GHAPI_RET_FAILURE, _ $GHAPI_RET_COUNTER #EndRegion GHAPI.au3 - Declarations #Region GHAPI.au3 - API Functions Func _GHAPI_ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_GHAPI_ErrFunc Func _GHAPI_AccessToken($sParam = Default) ; https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/ ; https://github.com/settings/tokens Local Static $sAccessToken = '' If $sParam <> Default Then $sAccessToken = $sParam Return $sAccessToken EndFunc ;==>_GHAPI_AccessToken Func _GHAPI_GetUser($sUser) Local $oHTTP = __GHAPI_HTTP_Open("GET", $sUser) Local $oJSON = __GHAPI_HTTP_Send($oHTTP) If @error Then Return SetError(@error, @extended, False) #forceref $oJSON EndFunc ;==>_GHAPI_GetUser Func _GHAPI_GetUserOrganizations($sUser) Local $oHTTP = __GHAPI_HTTP_Open("GET", $sUser & '/orgs') Local $oJSON = __GHAPI_HTTP_Send($oHTTP) If @error Then Return SetError(@error, @extended, False) #forceref $oJSON EndFunc ;==>_GHAPI_GetUserOrganizations Func _GHAPI_RootEndpoints() Local $oHTTP = __GHAPI_HTTP_Open("GET", '') Local $oJSON = __GHAPI_HTTP_Send($oHTTP) If @error Then Return SetError(@error, @extended, False) #forceref $oJSON EndFunc ;==>_GHAPI_RootEndpoints #EndRegion GHAPI.au3 - API Functions #Region GHAPI.au3 - INTERNAL Functions Func __GHAPI_HTTP_Open($sMethod, $sCommand, $sURLParameters = '') Local $oHTTP = ObjCreate("WinHttp.WinHttpRequest.5.1") Local $sURL = $__g_sGitHubAPI_BaseUrl & "/" & $sCommand & $sURLParameters ;~ __GHAPI_DebugOut("> $sURL=" & $sURL & @CRLF) $oHTTP.Open($sMethod, $sURL, False) If @error Then Return SetError(@error, @extended, Null) $oHTTP.setRequestHeader("Authorization", "Bearer " & _GHAPI_AccessToken()) ; Accept: application/vnd.github.v3+json $oHTTP.setRequestHeader("Accept", "application/vnd.github." & $__g_sGitHubAPI_Version & "+json") ; User-Agent: Awesome-Octocat-App $oHTTP.setRequestHeader("User-Agent", "AutoIt UDF") Return $oHTTP EndFunc ;==>__GHAPI_HTTP_Open Func __GHAPI_HTTP_Send(ByRef $oHTTP, $sSendParameter = Default) If $sSendParameter = Default Then $oHTTP.Send() Else $oHTTP.Send($sSendParameter) EndIf ConsoleWrite('+' & $oHTTP.Status & @CRLF) ConsoleWrite('>' & $oHTTP.StatusText & @CRLF) ConsoleWrite($oHTTP.ResponseText & @CRLF) ConsoleWrite(@CRLF) If @error Then Return SetError(@error, @extended, $GHAPI_RET_FAILURE) ;~ Return SetError($GHAPI_ERR_SUCCESS, $oJSON.Size, $oJSON) EndFunc ;==>__GHAPI_HTTP_Send #EndRegion GHAPI.au3 - INTERNAL Functions #Region GHAPI.au3 - HOWTO / DOCS / HELP #CS https://developer.github.com/v3/ https://developer.github.com/v3/guides/ https://developer.github.com/program/ https://github.com/contact?form%5Bsubject%5D=New+GitHub+Integration https://developer.github.com/ http://stackoverflow.com/questions/28796941/github-api-authentication-with-msxml2-xmlhttp #CE #EndRegion GHAPI.au3 - HOWTO / DOCS / HELP  
      This is just a modest start up and not a whole fully workable UDF, just so for a try, but maybe someone will be useful
      EDIT 1:
      If you need to make it workable just ask about specyfic feature.
      EDIT 2:
      Some changes in using word "GitHub" - to meet this rules: https://github.com/logos
    • Jefrey
      By Jefrey
      I've made this HTTP lib to simplify HTTP requests, mainly when dealing about POST data or file uploads.
      Three functions are available:
      string _HTTP_Get ( string $sURL ) string _HTTP_Post ( string $sURL , string $sPostData ) string _HTTP_Upload ( string $sURL , string $sFilePath , string $sFileField , string $sPostData = '' , string $sFilename = Default) Additionaly, two helper functions are also available:
      URLEncode($sStr) URLDecode($sStr) Full documentation: https://github.com/jesobreira/HTTP.au3/blob/master/README.md
      Fork me on Github: https://github.com/jesobreira/HTTP.au3
      Download lib + docs: https://github.com/jesobreira/HTTP.au3/archive/master.zip
    • ur
      By ur
      I have a github repository and when I run the below command it will retrieve a json file.
      curl --user "user:password" https://api.github.com/repos/ukreddy-erwin/Build-war/commits > Desktop/uday.html The output json file will be of the below format.
      [ { "sha": "525ddee5f25628f89c04980d7f683e9cd8f56b7a", "commit": { "author": { "name": "ukreddy", "email": "ukreddy@erwin.com", "date": "2016-12-26T12:27:14Z" }, "committer": { "name": "ukreddy", "email": "ukreddy@erwin.com", "date": "2016-12-26T12:27:14Z" }, "message": "changed gwt and gxt folder structure to build.xml", "tree": { "sha": "8d4f2cbca93efec18be8a17f25f78ad168e65347", "url": "https://api.github.com/repos/ukreddy-erwin/Build-war/git/trees/8d4f2cbca93efec18be8a17f25f78ad168e65347" }, "url": "https://api.github.com/repos/ukreddy-erwin/Build-war/git/commits/525ddee5f25628f89c04980d7f683e9cd8f56b7a", "comment_count": 0 }, "url": "https://api.github.com/repos/ukreddy-erwin/Build-war/commits/525ddee5f25628f89c04980d7f683e9cd8f56b7a", "html_url": "https://github.com/ukreddy-erwin/Build-war/commit/525ddee5f25628f89c04980d7f683e9cd8f56b7a", "comments_url": "https://api.github.com/repos/ukreddy-erwin/Build-war/commits/525ddee5f25628f89c04980d7f683e9cd8f56b7a/comments", "author": { "login": "ukreddy-erwin", "id": 21240709, "avatar_url": "https://avatars.githubusercontent.com/u/21240709?v=3", "gravatar_id": "", "url": "https://api.github.com/users/ukreddy-erwin", "html_url": "https://github.com/ukreddy-erwin", "followers_url": "https://api.github.com/users/ukreddy-erwin/followers", "following_url": "https://api.github.com/users/ukreddy-erwin/following{/other_user}", "gists_url": "https://api.github.com/users/ukreddy-erwin/gists{/gist_id}", "starred_url": "https://api.github.com/users/ukreddy-erwin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ukreddy-erwin/subscriptions", "organizations_url": "https://api.github.com/users/ukreddy-erwin/orgs", "repos_url": "https://api.github.com/users/ukreddy-erwin/repos", "events_url": "https://api.github.com/users/ukreddy-erwin/events{/privacy}", "received_events_url": "https://api.github.com/users/ukreddy-erwin/received_events", "type": "User", "site_admin": false }, "committer": { "login": "ukreddy-erwin", "id": 21240709, "avatar_url": "https://avatars.githubusercontent.com/u/21240709?v=3", "gravatar_id": "", "url": "https://api.github.com/users/ukreddy-erwin", "html_url": "https://github.com/ukreddy-erwin", "followers_url": "https://api.github.com/users/ukreddy-erwin/followers", "following_url": "https://api.github.com/users/ukreddy-erwin/following{/other_user}", "gists_url": "https://api.github.com/users/ukreddy-erwin/gists{/gist_id}", "starred_url": "https://api.github.com/users/ukreddy-erwin/starred{/owner}{/repo}", "subscriptions_url": "https://api.github.com/users/ukreddy-erwin/subscriptions", "organizations_url": "https://api.github.com/users/ukreddy-erwin/orgs", "repos_url": "https://api.github.com/users/ukreddy-erwin/repos", "events_url": "https://api.github.com/users/ukreddy-erwin/events{/privacy}", "received_events_url": "https://api.github.com/users/ukreddy-erwin/received_events", "type": "User", "site_admin": false }, "parents": [ { "sha": "db4d61c5bbef555e6cc9f2e852aaf9d75772475c", "url": "https://api.github.com/repos/ukreddy-erwin/Build-war/commits/db4d61c5bbef555e6cc9f2e852aaf9d75772475c", "html_url": "https://github.com/ukreddy-erwin/Build-war/commit/db4d61c5bbef555e6cc9f2e852aaf9d75772475c" } ] } ] So, I need to parse above file and get the number of opening and closing brackets {} .
      So that would be the number of commits in the repository.
      Any suggestion on how to parse this file of json format.
    • MrTheDzam
      By MrTheDzam
      Hello guys!

      I changed my website's login page yesterday. In that file, i used header() function to redirect user from login page to error page.
      But now my script (use WinHttpObj library) can't work. But if i change the login page to old page (without redirect) then my script works

      How can i fix that? 
    • MrTheDzam
      By MrTheDzam
      Hey guys!
      I have a register page. when i click register, it's will insert information to database.
      But if i refresh the page, the script just continues and insert the information to database again
      How can i fix it?