phplab-tasks's People
Forkers
filosoff13 coremany alexanderzenchenko holjavka radvers andrewvakaryuk shtuka1993 andrii-kleba nikonotea oleksandr-karagiaur andrew-lviv vitai55 vovanolo naikshy nikamel vadymzmiievskyi luborrod hunkevychphilip elielis pk063ua radionfromodessa guentur missing009 fedolmy ihor-molotov konovalovm alexanderkopyl alexpavlenko91 dankomax yuliav77 acrodim larikcode andriiyy pashkalalala serzg1k anas-alali-24 pokrovshchuk braincode-dev andriyyy staskozar ket-hem devosovich sergtkachev yura-sokolovskyi hlopec seoave lenadgit sergio1222 mariandanylivphplab-tasks's Issues
array_sum instead of foreach
You can user array_sum()
instead of foreach.
phplab-tasks/src/01-basics.php
Line 72 in 6d7e55b
This logic does not work when a noun begins with a capital letter
phplab-tasks/src/02-strings.php
Line 69 in a39e8f8
Redundant if-else
There is no need in if+else, you can just make return
return date("d", strtotime("{$year}-02-29")) == 29;
phplab-tasks/src/01-basics.php
Line 44 in a39e8f8
What if argument contains not only lowercase letters
If $noun contains not only lowercase letters, this will not work as required.
phplab-tasks/src/02-strings.php
Line 72 in a39e8f8
Year comparison
Please make this according to requirement: exactly lower then.
- Throw InvalidArgumentException if $year is lower then 1900.
phplab-tasks/src/01-basics.php
Line 41 in 6d7e55b
Shorter condition
It's better to use 1 comparison instead of 2:
if (strlen($input) != 6)
phplab-tasks/src/01-basics.php
Line 64 in 6d7e55b
Leap year definition
Leap year (високосний) is not just every even year (парний).
phplab-tasks/src/01-basics.php
Line 44 in 6d7e55b
Redundant ternary operator
Ternary operator is redundant in this case because $sumArray[0] == $sumArray[1]
returns true or false already.
phplab-tasks/src/01-basics.php
Line 77 in 6d7e55b
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.