Skip to content

Commit

Permalink
Add new questions about Psrs (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaule authored and mickaelandrieu committed Mar 8, 2017
1 parent 8b05f26 commit dbcdf44
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions data/psr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
category: PHP Standards Recommendations
questions:
-
question: 'Psr-3 LoggerInterface exposes eight methods to write logs to the eight RFC 5424 levels, which level does not exist ?'
answers:
- {value: debug, correct: false}
- {value: alert, correct: false}
- {value: severe, correct: true}
- {value: warning, correct: false}
-
question: "Which methods is not in Psr-3"
answers:
- {value: log, correct: false}
- {value: set, correct: true}
- {value: dump, correct: true}
- {value: print, correct: true}
-
question: 'In Psr-3 what delimiter is used for placeholder names ?'
answers:
- {value: '( name )', correct: false}
- {value: '[ name ]', correct: false}
- {value: '{{ name }}', correct: false}
- {value: '{ name }', correct: true}
-
question: 'Which Psr is about autoloading ?'
answers:
- {value: Psr-0, correct: true}
- {value: Psr-11, correct: false}
- {value: Psr-4, correct: true}
- {value: Psr-6, correct: false}
-
question: 'According to Psr-2, Whish code is correct ?'
answers:
- {value: '$foo->bar($arg1);', correct: true}
- {value: '$Foo->bar($arg1);', correct: false}
- {value: 'class Foo extends Bar implements FooInterface', correct: true}
- {value: 'class foo extends Bar implements FooInterface', correct: false}
-
question: 'According to Psr-1 methods have to be declared like ?'
answers:
- {value: 'myMethod();', correct: true}
- {value: 'MyMethod();', correct: false}
- {value: 'my_method();', correct: false}
- {value: 'My_Method();', correct: false}
-
question: 'Which Psr is about caching ?'
answers:
- {value: 'Psr-0', correct: false}
- {value: 'Psr-6', correct: true}
- {value: 'Psr-16', correct: true}
- {value: 'Psr-1', correct: false}
- {value: 'Psr-2', correct: false}
-
question: 'Which Psr is deprected now ?'
answers:
- {value: 'Psr-1 (Basic Coding Standard)', correct: false}
- {value: 'Psr-6 (Caching Interface)', correct: false}
- {value: 'Psr-0 (Autoloading Standard)', correct: true}
- {value: 'Psr-11 (Container Interface)', correct: false}

0 comments on commit dbcdf44

Please sign in to comment.