 Baiklah, hari ini saya akan bercakap tentang mempunyai dan mempunyai PSR Ini adalah, saya beritahu ini, sebenarnya tidak beritahu Saya beritahu ini sehingga 2.5 jam akan berjumpa Kembali di PSP Conference Asia 2016 Baiklah, ia tidak akan menjadi 2.5 jam hari ini Saya akan cuba mencari, berharap semuanya selama 45 minit Baiklah, jadi sesuatu tentang diri saya, nama saya Zyan Saya dari Singapura, jadi website saya Zyan.SG Saya adalah web freelancer dan mobil pembangunan Saya juga co-organisasi bersama Michael dan Huay Ruan Serving NS untuk group PSP user Selain PSP Conference Asia Jadi, anda ingin mencari lebih banyak tentang saya, anda boleh menikmati website saya Jadi, mereka beritahu saya hari ini, apa adalah PSR? PSR 0, 1, 2, 4, dan 7 Jadi, apa adalah PSR? PSR berkongsi untuk standar PSP Ia dibuat oleh Framework Interoperability Group, atau FIG Jadi, apa yang berlaku pada tahun 2009? Group Framework Developers di Conference PSP Berkata, mari kita bergabung dengan orang lain Kenapa tidak, mari kita bersama Kita cuba mencari cara yang biasa untuk kita berdua Dan kita cuba membuat hidup lebih mudah untuk pembangunan PSP Jadi, itu adalah cara PSR berkongsi Jadi, kita bermula dari 5 orang Dan kemudian, mereka berkongsi dengan 20 orang Sekarang, mungkin lebih dari 30-40 orang Jadi, beberapa memberitahkan komposer, Drupal, Timber Jendol, dan Zyan Framework Ada beberapa projek yang boleh digunakan dan keluar di Larival Untuk apa yang saya tahu di Larival Archies dan SLAF, FIG Jadi, projek ini Mereka menggabungkan standar ini Kerana mereka ingin pembangunan, pemeriksaan yang menggunakan projek seperti Zyan Framework Untuk sebenarnya mempunyai pelajar yang terbaik Jadi, ini adalah website www.php-fig.org Sekarang, ada sekitar 20 orang yang mempunyai projek PSR atau standar yang mereka berkongsi Jadi, ini adalah perkara lain Jadi, kenapa standar ini? Ini adalah pemeriksaan popular SKCD Jadi, perkara mainnya adalah PSP mempunyai pemeriksaan yang sangat rendah untuk masuk Mereka melihat banyak projek dan pemeriksaan dengan standar yang berlainan Perniagaan yang berlainan, desain yang berlainan Jadi, ini mempunyai pemeriksaan yang berlainan Tetapi, orang selalu lupa, sebenarnya PSP berkongsi 79% dari website di dunia Jadi, apa yang berlainan adalah projek ini Mereka sebenarnya mempunyai pemeriksaan FIG Mereka ingin mempunyai standar ini Jadi, kita boleh belajar tentang projek yang terbaik Kita boleh belajar mereka Dan sebenarnya, kita membuat hidup lebih baik Dan kita pastikan bahawa kita masih dapat mengambil pemeriksaan PSP Jadi, beberapa terminologi komut di PSR Seperti RFC 2.1.1.9 Jadi, kamu akan melihat Mas, Mas Note, Require Shell, Shell Note Semua ini adalah Semua pemeriksaan di bawah RFC 2.1.1.9 Jadi, semasa orang mempunyai pemeriksaan untuk berkongsi Apabila mereka meletakkan pemeriksaan Untuk membuat pemeriksaan yang lebih berlainan Mereka akan menggunakan terminologi komut Jadi, kita datang ke PSR0 Untuk autoloading standar Jadi, pada awal Apabila saya ingin mempunyai Web page, saya akan mempunyai pemeriksaan Kemudian, apabila saya memperkenalkan pemeriksaan Saya akan mempunyai pemeriksaan internet Kemudian, saya akan memperkenalkan Pemeriksaan SQL Kemudian, saya akan memperkenalkan Pemeriksaan password dan pemeriksaan pemeriksaan Tiba-tiba Tetapi, pemeriksaan ini Sangat adalah sebuah pemeriksaan spaghettik Kami mengambil data Dengan logik, dengan pemeriksaan Jadi, tiba-tiba Okey, mari kita membuat sesuatu yang perlu Jadi, kami sebenarnya membuat pemeriksaan SQL Terutamanya dalam pemeriksaan.php Dan kami membuat beberapa fungsi Dalam fungsi.php Jadi, tanpa membuat pemeriksaan Sebaiknya, kami membuat sebuah pemeriksaan Di sini untuk mengambil logik Kami hanya menghubungi Untuk pemeriksaan metacore adalah logik yang penting Jadi, ia nampak nilai Jadi, bagaimana untuk pemeriksaan bagaimana mereka sebenarnya menemukan pemeriksaan Jadi, dalam pemeriksaan.php.ini Pemeriksaan pemeriksaan Ada pemeriksaan pemeriksaan pemeriksaan Jadi, biasanya apabila kita katakan pemeriksaan Anda akan cuba menemukan dalam pemeriksaan yang sekarang Jika tidak Anda akan menemukan pemeriksaan dan menemukan sehingga anda menemukan pemeriksaan Jadi Dalam pemeriksaan pemeriksaan Pemeriksaan pemeriksaan kami memang berubahinegar kemudian mereka boleh menggambarkan Dari mana pemeriksaan dan bagaimana anda sebenarnya menolak pemeriksaan Jadi, bagaimana nampak Anda mempunyai pemeriksaan Jadi, ini akan melepas menghadiri pemeriksaan Anda mempunyai pemeriksaan dan Anda mempunyai pemeriksaan Oleh itu, bagaimana ini akan menjadi library slash full slash bar dot php and if you go even further you can have your namespace bus you use this file and you have a class code so this file itself will be library slash bus slash code dot php now you don't see any line we call include a certain file you only see a namespace namespace blah blah blah you use full slash bar so how does php actually find this file they find this file usually using something called autoloader okay this is actually how you register autoloader okay i'll show a sample of how the autoloader works later so psr0 these are from the specifications compulsory a fully qualified namespace as you saw just now must have the following structure vendor slash vendor name slash namespace slash another few list of subnamespaces and a class name so this is an example so in this case full is a vendor name bar and bus are the subnamespaces and codes is the class name so each namespace separator which you saw the slash just now is converted to a directory underscore separator when loading from file system for windows the directory separator is a bad slash for units and map the directory separator is a forward slash each underscore in the class name is converted to a directory separator and finally the class name is suffix that means to add a dot php to the end when loading from file system okay let's see some examples okay over here when I say use namespace slash dot 3 slash common slash isolated class loader so php were actually translated to your project path your vendor directory slash dot 3 slash common directory slash isolated class loader dot php some other examples for let's say you use zan acl you will translate to path to project slash zan dot 3 slash acl dot php now what happens in php 5.2 before namespaces were introduced in php 5.3 developers actually use underscore we say we don't have namespaces we come out with our fake namespaces so they actually use underscore so how do you do it with underscore underscore is if you have underscore in the class name it will be translated to a directory separator so class underscore name translate to class slash name dot php how about if you have underscore in the package name package underscore name this will be retained this will not be converted to a directory separator so package name will retain only underscore in the class name will be converted to slashes so this is an example the code here this is sample autolow function it takes in a simple class name so first you take out the leading slash and you replace all the other slashes with the correct directory separator so if your microsoft windows have all the bad slash you will convert everything to the forward slash and finally you will append dot php to the class name and you replace all the underscore with the correct directory separator and finally this is the most important one spl underscore autolow underscore register you register this function so when you say use a namespace you refer to a class php y3c how to find the file, how do i include the file i will find all the functions that is registered with autoload spl in this case function i will use this function i will pass it a class name which will return me the correct file to include and that is psr0 okay next we go to psr1 the basic coding standards let's let's look at all these names yes imagine you go to company and you see some legacy code and there are no naming conventions so people can name anything they like imagine you are the senior developer you are doing a code review you will probably go crazy so why can't everyone be consistent now standards are not hard and fast people are not hard and fast how many of you prefer the third one full bar how many of you prefer this one, capital full, capital bar and how many of you prefer all caps okay so for psr1 basic code standard for files files must only use the anger, question mark, php and the anger, question mark equal now for those of you who are old enough like me you remember that actually php last time could start with anger percentage use for ASP files okay that was very long time ago but for php files they must only use these two tags files must only use utfa bom for byte order mark if you have a text file save without the byte order mark and you are using a very old text editor that is not unicode aware, then the text editor will be able to open it now nicely so it's kind of a bad words compatibility now files should either declare symbols or call side effects but not do both over here now any underscore underscore set, this is a side effect because they are changing configuration settings include file.php this is a side effect because it loads a file echo something, this is a side effect because it generates output function full class full this is a declaration so that means that in your php file file is either producing side effects or declaring classes and methods you should not do both now namespaces and classnames namespaces and classes must follow an auto loading psr, that means your namespace must follow psr0 or 4, which i will talk about later classnames must be declare in study caps okay i have no idea what it means normally we call it Pascal case so it starts with a capital letter and every subsequent words starts with a capital letter so this is an example class full this is for php 5.3 later for 5.2 earlier your namespace will actually be using the underscore character because of course i'm sure nobody now averse here is using php 5.2 already constants, properties and methods class constants must be declare or uppercase with underscore separators methods must be declare in camel case, camel case means start with a small letter every subsequent words start with a capital letter so this is an example your constant date, underscore, approve equals to something constant version in capital letter your method name and every subsequent words start with a capital letter and just 4 slides so that's all for PSR1 so what is the cache? the cache is PSR2 PSR2 actually builds on PSR1 okay there are a lot of opinions and there's a lot of survey results after i'll show you it's quite interesting they actually ask all the 22 members at the time to achieve vote and they will pick the most popular choice it's your standard okay i not gonna talk so much why not we go one round this is an example actually show some rules for PSR2 okay let's go one round would you like to guess one PSR2 from this example let's look at the first 3 lines you need to keep the space between the php.continium space actually i'm not quite sure between between the php.continium and the namespace this one blank line i'm not quite sure they are looking to extending PSR2 but i can tell you there is supposed to be a blank line between namespace and use statement and there must be a blank line between use and the class anyone else want to guess another rule anyone yes the phrases after the condition is to follow the condition this one PSR1 the phrase that was one line up below okay so this line right okay so what Gus is thought of saying that for conditioners for blocks your opening brace must be on the same line must be on the same line okay any other guesses let's look at this one can i put implement first and then extend now so let me ask you why because that is a php rule no no no now the thing is in php you can extend one class you can extend inherit one parameter but you can implement many in the phases so first implement follow at the back how about this one this method parameters method parameters do you see anything special about this okay very good optional parameters at the back that means they have their own values anything else okay for classes and methods the opening brace will start on the next line not on the same line now for method parameters they must be separated by a comma and a space you cannot have dollar A comma dollar B you must have dollar A comma space dollar B let's see ah how about this one dollar A equals to dollar B okay space around the operator now how about the space between the bracket and the first value can i have bracket space dollar A but WordPress follow it differently for WordPress what you will have is the WordPress standards they will constantly also have to organize WordPress meetup of course i won't say this for WordPress what you will have is this okay they mandate for the WordPress standards they will actually mandate there must be a space after the opening bracket okay but not so for PSR for PSR 2 there must be a space before the opening bracket and no space after the closing bracket the same thing no space before the closing bracket and one space between the bracket and the space and the opening brace now there are many conditioners they only have one line it's only a one liner is it okay if i skip the opening brace and the closing brace no back in 2009 there was a bug actually in Apple's SSL library it was due to this opening brace and closing brace because it's all one line right just add one more character because of this opening brace and closing brace issue they miss out line so the whole SSL library had a vulnerability so even if if L statement has only one line you are supposed to enclose it in opening and closing braces okay finally final public static function bar final public static or abstract public static abstract private static static you cannot have static public final static abstract it must be in this order so abstract and final first then the visibility which is public protected private and then static so just now i mention whether you can see this let's see okay now for indent type i told you there are 22 members how many of you want type 7 people how many of you want 2 spaces how many of you want 4 spaces 14 people so PSR2 say you must indent your code with 4 spaces now a lot of them actually they use version control in the project so they know that actually spaces can help if we patches with histories easier to look for tabs your microsoft word may open a tab as 1.25cm my microsoft word trade a tab as 2cm but a space is a space everywhere so in space you can easily indent things how about line, length is there a limit so line, length, limit solve okay the most word is actually 80 so usually in my subline tabs let me see wait and we see that projector has a conkalk is there another let's see engine new start engine overheat do you have another USB-C so let's say that actually PSR is a hot topic that's why the projector is overheated normally I'll just continue talking while it's being fixed so normally in the editor you find that there's a line you can specify a line that say this is an 80 carat mark but it's not hot it's a soft limit so actually you can go beyond let's say you've commenced something if you come from a very old generation use an old terminal that's 80x25 terminal window if you have a bad bit screen if you have 80 carat put 2 windows side by side and you can see your code side by side the other limit is 120 so try as much as possible I'm not quite sure whether you can see this you see I'm not quite sure whether you can see this line here this is my 80 mark and then this is my 120 mark something like that okay let's see let's see let's see and first and now should it be lower case or uppercase lower case let me see closing php tag required no if your entire file contains only php code that means you have no miss hdmi you do not need to close it so this was the result this is how you came about PSR2 just some random 22 people you pick the best vote the most popular choice and that is your standard now there are many coding stuff fixes out there one by sensual labs and another one by code sniffer and you can also integrate travis for your to code to check your style so when you commit to a repository so example over here you actually run it through travis and you run through a code so i have travis.yml so over here when i run it when i commit to the repository you will trigger or test a build on the travis ci and you run this file composer test and check for coding styles and over here you find that okay run through everything for you so this is part of continuous integration let me show you one example i have sampled of PHP with some errors PHP cs.file this is the PHP archive is executable to run through a code sniffer so what happens when i run it so actually you go through the file and tell me where are all the errors so for example here on line4 class constants must be uppercase so let's look at line4 line4 which is here constants are supposed to be uppercase so it detected so it can also help to fix the error if there is a later on okay psr file psr4 is another auto-learning standard is to replace psr0 so actually psr0 is deprikated every new psr6 to fix or complemented normally will deprikate the previous psr so composer is the PHP dependency manager so why bother replacing it okay psr0 was based on the pen installer pen installer move all the source file from the packages into 1.3 but for once you had composer composer can actually handle different attributes for different libraries so for example you have 3 libraries and they are in all different places on your hard disk or on your server composer can manage that so an example psr0 supposing i have vendor name slash package name slash class so this is how the directory structure will look like vendor name slash package name slash vendor name slash package name slash classname.php okay but for psr4 because of the update you can do a flatter directory structure vendor name slash package name slash source slash classname.php easier these are some examples for example let's say look at aura slash web slash response slash status and this is where the library is stored so it will actually translate to aura web slash source slash response slash status.php how about zen acl supposing the zen library is installed on slash user slash includes so this is where composer will find the file for zen acl.php slash user slash includes slash zen slash acl.php so if psr4 is much easier you can actually call your library, store your library in different locations now the last psr i going to talk about is psr7 the HTTP message interface this according to matthew realovni it's a team lead for zen framework it's the most exciting psr and frankly speaking i gave this talk first in 2016 now 2019 after about 4 or 5 more psr have appeared this to me is still the most exciting psr okay in the beginning if i want to have a form okay i want to output a city so i will take in the query parameter city equals to sg so you say city is Singapore and then you can type in some text after that you will say what text later on if i were to use a framework zen framework, level framework, symphony framework i will write a controller i will extend something of proprietary class in that section i will get a request i will get the text that the person key into the form and i will return a view model how do i get the city here over here i will pack question mark city equals to sg parameter i will call this method params many frameworks and there are many different ways of doing this and they are all using their own proprietary classes for doing this now there is a similarity towards all this you will get a request you process it and then you return a response so you have all these frameworks all are co-initers symphony k, level, zen framework, guzzar, bus so the problem is all of them they deal with this differently they come out of their own classes to extract your web application so what do they abstract they abstract the form post they server super global they extract the request uri they handle file uploads input output strings and the returning of response so every framework have their own ways of doing it so this is a web application in the simplest form you have a request going to the server and you have a response and in short a request is basically a verb get, post, boot, patch the uri and the protocol version and the response consists of the protocol version a response code a response code and a reason phrase so it looks similar a request and response basically in its most simplest form is basically just a message that has a verb a uri, a protocol and a body so this is the overview of PSR7 they recommend interfaces for PSR7 so if your project if this framework implements PSR7 they will implement these interfaces but PSR do not dictate the implementation details you are welcome to do your own hacky or fantastic way or fancy way of implementation but you just have to follow the interface so first one a request and a response is basically a message so if you to use a PSR7 or a portable library you will be guaranteed of all these methods get haters get body, with hater, with body now what's the difference okay PHP passes objects by reference so in this view PSR actually detains that all these methods should return new instances you shouldn't modify the original object or else the object to somewhere else down the line right you may accidentally edit or change the original object so when you are modifying you will actually return a new instance so repeater will return a new message with body will return another new message instance a request a request interface if it contains a message interface so you have get method get URI, body which is a stream so in this case this will chain up and actually this will return 4 different instances so let's say if i want to construct a request with a get method, with URI we will body this is how i will do it so you don't need to remember exam framework constructs a request using this class and this methods level constructs a request using this class and this methods you don't need to remember this anymore PSR7, you only need to remember one set of methods a response a response has a status code a reason phrase and as well as a body so this is how you generate a new response with body, with status server request interface this is built on top of request interface because PHP have server variables server super global so how do you get a query parameter how do you get a pass body how do you get a upload file so you use a server request interface and suppose if i have query parameter question mark id equals 5 how do i get that parameter i will actually use get attribute so the application must pass the route and inject it into the request attribute stream interfaces to request body and the response body both use streams now, how many of you have voted dollar underscore files this file super global okay 1 2 3 4, very good now, suppose if i upload 2 files and then i open up the dollar underscore files do you think this is the error? is this correct or wrong so i uploaded 2 files file 0 and file 1 so you have an error under the files you have 0 which is the first file name and type and you have the second file name and type okay this is wrong the actual the actual structure of the array will be like this so if you have your files you have a name property the name for the first file is here the name for the second file is here you have another property called type the type for the first file is here and the type for the second file is here so this is very confusing imagine you have to pass this manually by hand so psr7 they came out of an uploaded file you don't need to worry about that anymore if you are using a psr7 library so you just need to get the uploaded files on the request and to get the name file client file name to get the size you don't need to remember actually i must read the size key and then read the third file to get the size of the third file you don't need to do that anymore now what's in a uri uniform resource identifier you have your scheme you have your authority you have a port you have a path you have a query string and you have a fragment sounds easy right imagine trying to manually compose your uri using your server super global if you output your server super global you get all these variables and you're supposed to reconstruct the uri by yourself so psr7 came out of a uri interface all the psr7 libraries they will have all these methods so in order for you to get a path just call get path you don't need to worry which one do i actually look for the path or do i need to explode this but the question mark explode this but it equal no need just call these methods so now information overload there's a lot of matters a lot in the phases so why is this the future of php the answer is actually middleware i'm going to show you briefly the sample lab that i did during the conference back then i have a lab here so this is a typical php application using composer so let's look at what composer have okay require these are the libraries that i use psr slash atgp i implement getting the interfaces over here zen diathros and zen strategi is basically an implementation of psr7 remember psr7 only contain interfaces they do not contain implementation details so what zen framework they came out of their own library to implement psr7 so auto load over here psr4 now let's see now what happens when i run the application i put question mark target equal zaya so you will say hello zaya very simple it is in the query parameter and then i put hello my name this is the contents very simple i will just call the auto load from composer i will use a pipe i run through my confit and i will listen let me show you what's inside confit.php now middleware middleware is like anion so supposing let's say in a fast food chain so the customer customer say i want a vegetarian burger so i tell the first person there is a bun and then there is his response he pass it to the next person the person put a patty the next person puts a vegetable then after that pass back to the second person pass back to the first person he put the top bun and then pass back to the cashier and the cashier pass to the customer so the request goes in all the way to the end and then the response comes out all the way to the end so everyone adds on factory production line you have in this case a middleware pipeline so in this case my middleware pipeline currently only has one application hallow action so let's look at what hallow action has okay first thing it uses PSR response interface and PSR server request interface look carefully this is a plain old php class i do not extend any framework specific controllers or class at all this is a plain old php class this was the original way to do middleware it has been since replaced by PSR 15 so you have invoked you take in the PSR 7 request PSR 7 response and a callable nest callable nest so first thing how do i get this dollar this question mark target how do i get this query parameter i will get it from here query equals to request get query parameters this method is a PSR 7 method not a framework specific method now target i'll just get it from here how do i get a body how do i create how do i create a new response first i create a body so i write a body and i write a stream and i will create a new response with header content type and i pass it to the nest middleware so imagine factory production line you have 3 people so first it comes to the first middleware process request i formulate my response and the response to the next middleware so in this case this is how i actually pass it to the next middleware next i'll pass in the request and the response a PSR 7 request and a PSR 7 response now what happens if i were to add this so first the request comes to hello action first so hello action will process request after that i have a response hello zion then i pass this request and the response to the next middleware which is welcome action okay so previously this is hello zion the request parameter is zion the first middleware say okay my response is hello zion now let me pass it to the next middleware which is welcome action i'll get welcome zion so let's look at what is the difference same thing PSR 7 new spaces class welcome action is a plain PHP class no extension it does not extend any framework specific classes same method signature i taking a PSR 7 request i taking a PSR 7 response and i taking the next middleware so the old response body which is hello zion then i create new response body i replace hello with welcome and i write it in the stream and i create new response the new response is i will replace the body in the old response after that i'll pass it to the next middleware but in this case there's no more next middleware so your final output welcome zion now what happens supposing let me add another one off action so i want to run it through authentication probably some username or password or some old off credentials and only when it passes then it will work so the request will go to go to off action first okay let us try what will happen nothing so let's look at what is the value in off action same thing PSR 7 class action a plain old PHP class with no famous specific classes same signature take in a PSR 7 request PSR 7 response and next middleware first i will check for query parameters and i check for a secret key if the secret key equals to this value then i will return welcome zion or else i will just say bye bye haze so actually 2016 when i was conducting workshop thanks to our neighbors down south we actually had a lot of haze during September so that's why i buy haze so let me try inputting the secret 2016 22nd welcome zion so this is the secret if i pass in the correct secret you will actually just return the original response to the next middleware if i don't pass the secret that means i fear my authentication then i will override the body and write something else by haze and i will just return the new response straight away pass it to the next middleware okay you notice if i pass the authentication i will pass the request and response to the next middleware if i fear the authentication i will return the response straight away i don't even pass to the next middleware because no point what you fear so it's as if you go to the cashier today i was buying something for my niece go to so asking for this dinosaur book so supposing if i go to cashier is this dinosaur book still available i don't buy happy mirror don't have it they won't even bother telling the kitchen to prepare a happy mirror for me they will just tell me sorry i will stop then i will just go back so in this case you either short circuit they may cut out and you return the response straight away so the request response to the next middleware so this is the excitement and the promise of PSR7 because it gives rise to middleware which is now documented in PSR15 so imagine no more framework specific components you have your Xen framework libraries you have symphony components you have level packages and the code that i just written over here it is just a play psp class that uses PSR7 libraries supposing if i don't have xen diart throws let's say gas wrote a new library to implement PSR7 i can just easy drop it in and all these methods will still exist i can take this whole class and dump it in another framework in another project it will still work so that is the promise to actually stop the proliferation of frameworks so you will see about serverless let me give you a new buzzword frameworkless so we go back to the good old psp days so actually middleware is very simple it is basically taking a request pass it to a lambda or a black box simple as it is for this i have a previous job and also how i came about this was xen expressive so xen expressive actually helps you to get started PSR15 middleware in minutes so it is just a PSR15 middleware PSR7, HTTP messages and all this stuff so you may be wondering but if i want to use a particular library let say for creating my template or model because you only returning a PSR7 response then you will do so via constructor dependency injection you will just inject your external dependencies via the constructor so you are not dependent on particular vendor or library so let me see with this and that's the end, thank you very much okay any questions now PSR1 or 2 or you still can use or even fix up no, they are still there so a lot of psp projects they actually put it in that continuous integration so when you commit to the repository straight away you run through the test and check whether it conforms to PSR1 and PSR2 that's the most basic PSR1, PSR2 PSR2 and PSR4 so if you look at this the composer file so PSR4 most projects go PSR4 and they will check for PSR conformance with PSR1 and PSR2 so if your test do not even pass PSR1 and PSR2 the senior developer will probably don't even do the code review at all and if you find out more about PSR you can actually go to the website you just type PSR2 or something and let me see okay, currently there are so many PSR1, coding standard PSR2, coding style for auto loading standard PSR7, 11, 15 and there are some in review there is standard coding style PHP.standard Huggable interface which is just for fun and obligated 0 so 20 over PSR Any other questions?