@@ -52,20 +52,20 @@ class Repositories extends AbstractPackage
5252 */
5353 public function getListOwn ($ type = 'all ' , $ sort = 'full_name ' , $ direction = '' )
5454 {
55- if (false == \in_array ($ type , array ('all ' , 'owner ' , 'public ' , 'private ' , 'member ' )))
55+ if (\in_array ($ type , array ('all ' , 'owner ' , 'public ' , 'private ' , 'member ' )) == false )
5656 {
5757 throw new \RuntimeException ('Invalid type ' );
5858 }
5959
60- if (false == \in_array ($ sort , array ('created ' , 'updated ' , 'pushed ' , 'full_name ' )))
60+ if (\in_array ($ sort , array ('created ' , 'updated ' , 'pushed ' , 'full_name ' )) == false )
6161 {
6262 throw new \RuntimeException ('Invalid sort field ' );
6363 }
6464
6565 // Sort direction default: when using full_name: asc, otherwise desc.
66- $ direction = ($ direction ) ? : ((' full_name ' == $ sort ) ? 'asc ' : 'desc ' );
66+ $ direction = ($ direction ) ? : (($ sort == ' full_name ' ) ? 'asc ' : 'desc ' );
6767
68- if (false == \in_array ($ direction , array ('asc ' , 'desc ' )))
68+ if (\in_array ($ direction , array ('asc ' , 'desc ' )) == false )
6969 {
7070 throw new \RuntimeException ('Invalid sort order ' );
7171 }
@@ -97,20 +97,20 @@ public function getListOwn($type = 'all', $sort = 'full_name', $direction = '')
9797 */
9898 public function getListUser ($ user , $ type = 'all ' , $ sort = 'full_name ' , $ direction = '' )
9999 {
100- if (false == \in_array ($ type , array ('all ' , 'owner ' , 'member ' )))
100+ if (\in_array ($ type , array ('all ' , 'owner ' , 'member ' )) == false )
101101 {
102102 throw new \RuntimeException ('Invalid type ' );
103103 }
104104
105- if (false == \in_array ($ sort , array ('created ' , 'updated ' , 'pushed ' , 'full_name ' )))
105+ if (\in_array ($ sort , array ('created ' , 'updated ' , 'pushed ' , 'full_name ' )) == false )
106106 {
107107 throw new \RuntimeException ('Invalid sort field ' );
108108 }
109109
110110 // Sort direction default: when using full_name: asc, otherwise desc.
111- $ direction = ( $ direction) ? : (( ' full_name ' == $ sort ) ? 'asc ' : 'desc ' );
111+ $ direction = $ direction ? : ($ sort == ' full_name ' ? 'asc ' : 'desc ' );
112112
113- if (false == \in_array ($ direction , array ('asc ' , 'desc ' )))
113+ if (\in_array ($ direction , array ('asc ' , 'desc ' )) == false )
114114 {
115115 throw new \RuntimeException ('Invalid sort order ' );
116116 }
@@ -140,7 +140,7 @@ public function getListUser($user, $type = 'all', $sort = 'full_name', $directio
140140 */
141141 public function getListOrg ($ org , $ type = 'all ' )
142142 {
143- if (false == \in_array ($ type , array ('all ' , 'public ' , 'private ' , 'forks ' , 'sources ' , 'member ' )))
143+ if (\in_array ($ type , array ('all ' , 'public ' , 'private ' , 'forks ' , 'sources ' , 'member ' )) == false )
144144 {
145145 throw new \RuntimeException ('Invalid type ' );
146146 }
@@ -188,24 +188,23 @@ public function getList($id = 0)
188188 * @param string $org The organization name (if needed).
189189 * @param string $description The repository description.
190190 * @param string $homepage The repository homepage.
191- * @param boolean $private Set true to create a private repository, false to create a public one.
192- * Creating private repositories requires a paid GitHub account.
191+ * @param boolean $private Set true to create a private repository, false to create a public one. Creating private repositories
192+ * requires a paid GitHub account.
193193 * @param boolean $hasIssues Set true to enable issues for this repository, false to disable them.
194194 * @param boolean $hasWiki Set true to enable the wiki for this repository, false to disable it.
195195 * @param boolean $hasDownloads Set true to enable downloads for this repository, false to disable them.
196- * @param integer $teamId The id of the team that will be granted access to this repository.
197- * This is only valid when creating a repo in an organization.
196+ * @param integer $teamId The id of the team that will be granted access to this repository. This is only valid when creating a
197+ * repo in an organization.
198198 * @param boolean $autoInit true to create an initial commit with empty README.
199- * @param string $gitignoreTemplate Desired language or platform .gitignore template to apply.
200- * Use the name of the template without the extension.
201- * For example, “Haskell” Ignored if auto_init parameter is not provided.
199+ * @param string $gitignoreTemplate Desired language or platform .gitignore template to apply. Use the name of the template without the
200+ * extension. For example, “Haskell” Ignored if auto_init parameter is not provided.
202201 *
203202 * @return object
204203 *
205204 * @since 1.0
206205 */
207- public function create ($ name , $ org = '' , $ description = '' , $ homepage = '' , $ private = false , $ hasIssues = false ,
208- $ hasWiki = false , $ hasDownloads = false , $ teamId = 0 , $ autoInit = false , $ gitignoreTemplate = ''
206+ public function create ($ name , $ org = '' , $ description = '' , $ homepage = '' , $ private = false , $ hasIssues = false , $ hasWiki = false ,
207+ $ hasDownloads = false , $ teamId = 0 , $ autoInit = false , $ gitignoreTemplate = ''
209208 )
210209 {
211210 $ path = ($ org )
@@ -263,8 +262,8 @@ public function get($owner, $repo)
263262 * @param string $name The repository name.
264263 * @param string $description The repository description.
265264 * @param string $homepage The repository homepage.
266- * @param boolean $private Set true to create a private repository, false to create a public one.
267- * Creating private repositories requires a paid GitHub account.
265+ * @param boolean $private Set true to create a private repository, false to create a public one. Creating private repositories
266+ * requires a paid GitHub account.
268267 * @param boolean $hasIssues Set true to enable issues for this repository, false to disable them.
269268 * @param boolean $hasWiki Set true to enable the wiki for this repository, false to disable it.
270269 * @param boolean $hasDownloads Set true to enable downloads for this repository, false to disable them.
@@ -274,8 +273,8 @@ public function get($owner, $repo)
274273 *
275274 * @since 1.0
276275 */
277- public function edit ($ owner , $ repo , $ name , $ description = '' , $ homepage = '' , $ private = false , $ hasIssues = false ,
278- $ hasWiki = false , $ hasDownloads = false , $ defaultBranch = ''
276+ public function edit ($ owner , $ repo , $ name , $ description = '' , $ homepage = '' , $ private = false , $ hasIssues = false , $ hasWiki = false ,
277+ $ hasDownloads = false , $ defaultBranch = ''
279278 )
280279 {
281280 $ path = '/repos/ ' . $ owner . '/ ' . $ repo ;
0 commit comments